Hi,
I have instrumented a C++ application with user space tracepoints. When I run
the application and do a: "lttng list -u" command, I am able to see all my
available tracepoints for the application. However when I enable those user
space tracepoints and then start the trace, a core gets dumped and examining
the core file in gdb I see the following error:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00000000 in ?? ()
...
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x08dd1088 in __event_probe__mike___sem_wait_entry (__tp_data=0xef92d818)
at /localhome/zhengd/override_mcd/System/SS_Inc/./sem_wrapper.h:67
#2 0x08dd44d9 in __tracepoint_cb_mike___sem_wait_entry () at
/localhome/zhengd/override_mc /System/SS_Inc/sem_wrapper.h:67
#3 __wrap_sem_wait (sem=0xf43014c8) at
/localhome/zhengd/override_mcd/System/System_Services/SysServices_Linux/SystemLinux.cpp:1877
Contextual Information: I would like to trace all calls to sem_wait() in my
application. I am simply using a wrapper sem_wait function where I can place
tracepoint() calls. Here's what the sem_wait wrapper looks like:
extern "C" int __real_sem_wait(sem_t*);
extern "C" int __wrap_sem_wait(sem_t* sem)
{
tracepoint(mike, sem_wait_entry);
int ret = __real_sem_wait(sem);
tracepoint(mike, sem_wait_exit, ret);
return ret;
}
Here is the TRACEPOINT_EVENT macro found in my tracepoint provider header file
(which was generated using lttng-gen-tp command line utility):
TRACEPOINT_EVENT(mike,
sem_wait_entry,
TP_ARGS(),
TP_FIELDS()
)
And I am statically linking by using an existing CPP file (file with the
__wrap_sem_wait() function) to create probes. I would just like to know any
possible reasons why this error may be happening given the above mentioned
circumstances and what I may be able to try in order to fix this.
Thanks,
Dilong
_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev