이 콘텐츠는 선택한 언어로 제공되지 않습니다.
9.2. Context at the probe point
The following functions provide ways to access the current task context at a probe point. Note that these may not return correct values when a probe is hit in interrupt context.
9.2.1. backtrace 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
backtrace:string ()
backtrace:string ()
Returns a string of hex addresses that are a backtrace of the stack. The output is truncated to MAXSTRINGLEN.
9.2.2. caller 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
caller:string()
caller:string()
Returns the address and name of the calling function. It works only for return probes.
9.2.3. caller_addr 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
caller_addr:long ()
caller_addr:long ()
Returns the address of the calling function. It works only for return probes.
9.2.4. cpu 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
cpu:long ()
cpu:long ()
Returns the current cpu number.
9.2.5. egid 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
egid:long ()
egid:long ()
Returns the effective group ID of the current process.
9.2.6. euid 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
euid:long ()
euid:long ()
Returns the effective user ID of the current process.
9.2.7. execname 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
execname:string ()
execname:string ()
Returns the name of the current process.
9.2.8. gid 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
gid:long ()
gid:long ()
Returns the group ID of the current process.
9.2.9. is_return 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
is_return:long ()
is_return:long ()
Returns 1 if the probe point is a return probe, else it returns zero.
Deprecated.
9.2.10. pexecname 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
pexecname:string ()
pexecname:string ()
Returns the name of the parent process.
9.2.11. pid 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
pid:long ()
pid:long ()
Returns the process ID of the current process.
9.2.12. ppid 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
ppid:long ()
ppid:long ()
Returns the process ID of the parent process.
9.2.13. tid 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
tid:long ()
tid:long ()
Returns the ID of the current thread.
9.2.14. uid 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
uid:long ()
uid:long ()
Returns the user ID of the current task.
9.2.15. print_backtrace 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
print_backtrace:unknown ()
print_backtrace:unknown ()
This function is equivalent to
print_stack(backtrace())
, except that deeper stack nesting is supported. The function does not return a value.
9.2.16. print_regs 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
print_regs:unknown ()
print_regs:unknown ()
This function prints a register dump.
9.2.17. print_stack 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
print_stack:unknown (stk:string)
print_stack:unknown (stk:string)
This function performs a symbolic lookup of the addresses in the given string, which is assumed to be the result of a prior call to
backtrace()
. It prints one line per address. Each printed line includes the address, the name of the function containing the address, and an estimate of its position within that function. The function does not return a value.
9.2.18. stack_size 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
stack_size:long ()
stack_size:long ()
Returns the size of the stack.
9.2.19. stack_unused 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
stack_unused:long ()
stack_unused:long ()
Returns how many bytes are currently unused in the stack.
9.2.20. stack_used 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
stack_used:long ()
stack_used:long ()
Returns how many bytes are currently used in the stack.
9.2.21. stp_pid 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
stp_pid:long ()
stp_pid:long ()
Returns the process ID of the of the staprun process.
9.2.22. target 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
General syntax:
target:long ()
target:long ()
Returns the process ID of the target process. This is useful in conjunction with the -x PID or -c CMD command-line options to stap. An example of its use is to create scripts that filter on a specific process.
-x <pid>
-x <pid>
target() returns the pid specified by -x
-c <command>
-c <command>
target() returns the pid for the executed command specified by -c.