검색

이 콘텐츠는 선택한 언어로 제공되지 않습니다.

9.2. Context at the probe point

download PDF
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 ()
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()
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 ()
Returns the address of the calling function. It works only for return probes.

9.2.4. cpu

General syntax:
cpu:long ()
Returns the current cpu number.

9.2.5. egid

General syntax:
egid:long ()
Returns the effective group ID of the current process.

9.2.6. euid

General syntax:
euid:long ()
Returns the effective user ID of the current process.

9.2.7. execname

General syntax:
execname:string ()
Returns the name of the current process.

9.2.8. gid

General syntax:
gid:long ()
Returns the group ID of the current process.

9.2.9. is_return

General syntax:
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 ()
Returns the name of the parent process.

9.2.11. pid

General syntax:
pid:long ()
Returns the process ID of the current process.

9.2.12. ppid

General syntax:
ppid:long ()
Returns the process ID of the parent process.

9.2.13. tid

General syntax:
tid:long ()
Returns the ID of the current thread.

9.2.14. uid

General syntax:
uid:long ()
Returns the user ID of the current task.

9.2.15. print_backtrace

General syntax:
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 ()
This function prints a register dump.

9.2.17. print_stack

General syntax:
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 ()
Returns the size of the stack.

9.2.19. stack_unused

General syntax:
stack_unused:long ()
Returns how many bytes are currently unused in the stack.

9.2.20. stack_used

General syntax:
stack_used:long ()
Returns how many bytes are currently used in the stack.

9.2.21. stp_pid

stp_pid:long ()
Returns the process ID of the of the staprun process.

9.2.22. target

General syntax:
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>
target() returns the pid specified by -x
-c <command>
target() returns the pid for the executed command specified by -c.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.