![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /proc/self/root/opt/rh/gcc-toolset-11/root/usr/share/systemtap/examples/general/ |
#!/opt/rh/gcc-toolset-11/root/usr/bin/stap function printlnfp(a) { println(fp_to_string(a,5)) } probe process("stap").function("sdt_benchmark_thread") { a = $fp1 b = string_to_fp("3.14") c = long_to_fp(2) printf("a : %s, b : %s, c : %s\n", fp_to_string(a,5), fp_to_string(b,5), fp_to_string(c,5)) printf("round 3.14 to long : %ld\n", fp_to_long(b, 0, 0)) print("a + b * c = ") printlnfp(fp_add(a, fp_mul(b, c))) printf("sqrt(b) < b / c : ") println(fp_lt(fp_sqrt(b), fp_div(b, c))) exit() }