On Sat, Aug 16, 2025 at 03:04:17PM +0800, 赵佳炜 wrote:
Hi, Jiri. Sorry for my oversight, the optimized compile condition didn't work properly.
Could you try to replace the `__attribute__((optimize("O2")))` with `#pragma GCC optimize("O2")` in usdt_o2.c and verify it one more time? I guess it'll help. In fact, the usdt1 argument spec generated by the `__attribute__((optimize("O2")))` on my machine was `8@%rax`, not `8@(%rdx,%rax,8)`.
For more detail:
- #if defined(__GNUC__) && !defined(__clang__)
- __attribute__((optimize("O2")))
+#if (defined(__GNUC__) && !defined(__clang__)) +#pragma GCC optimize("O2") +#else +#pragma message("non-gcc compiler: the correct probes might not be installed") +#endif
Thanks
yep, that helped
stapsdt 0x00000033 NT_STAPSDT (SystemTap probe descriptors) Provider: test Name: usdt1 Location: 0x00000000007674d9, Base: 0x00000000035bc698, Semaphore: 0x0000000000000000 Arguments: 8@(%rdx,%rax,8)
thanks, jirka