이 콘텐츠는 선택한 언어로 제공되지 않습니다.
1.4. Sample SystemTap scripts
Following are some example scripts that illustrate the basic operation of SystemTap. For more examples, see the examples/small_demos/ directory in the source directory, the SystemTap wiki at http://sourceware.org/systemtap/wiki/HomePage, or the SystemTap War Stories at http://sourceware.org/systemtap/wiki/WarStories page.
1.4.1. Basic SystemTap syntax and control structures 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
The following code examples demonstrate SystemTap syntax and control structures.
This prints:
Note that all variable types are inferred, and that all locals and globals are initialized.
1.4.2. Primes between 0 and 49 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
This prints:
1.4.3. Recursive functions 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
This prints:
11th fibonacci number: 118
11th fibonacci number: 118
Any larger number input to the function may exceed the MAXACTION or MAXNESTING limits, which will be caught at run time and result in an error. For more about limits see Section Section 1.6, “Safety and security”.