Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
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 Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
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 Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
This prints:
1.4.3. Recursive functions Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
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”.