我正在使用具有相同文件的 lttng 文档中提供的示例 C 应用程序。
http://lttng.org/docs/#doc-tracing-your-own-user-application
我按照文档中的说明创建我的共享库。
gcc -shared -W1,--no-as-needed -o hello-tp.so -llttng-ust hello-tp.o
gcc -o hello hello.c hello-tp.o -ldl
hello-tp.so 与应用程序 hello 在同一文件夹中创建。所以我跑
LD_PRELOAD=./hello-tp.so ./hello and beyond
我检查该事件是否可用
PID: 13120 - Name: ./hello
ust_baddr_statedump:soinfo (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)
正如预期的那样,它已正确加载。
我允许跟踪所有事件。我运行我的应用程序并开始跟踪。然后我停止并使用“lttng view”查看跟踪。
但是我的跟踪文件是空的。
即使我启用了它,是否有任何事件被跟踪的原因?
谢谢你的帮助。