We are having some trouble with using QNX6 (6.2.1) and the instrumented
kernel with the TraceEvent function and I am hoping someone can shed some
light on what we are doing wrong.
A resource manager that we have written has had several TraceEvents added to
it like so:
static char errstr[BHN_DEBUG_BUFF_SIZE];
inline void XYZ_Trace1(int event, char *format, unsigned long arg1 ){
sprintf(errstr , format, arg1 );
TraceEvent(_NTO_TRACE_INSERTUSRSTREVENT, event, errstr );
}
I rebuilt the osimage with the instrumented kernel setup and run
“tracelogger -d” then my program to enable my TraceEvents then
“traceprinter” to decode the event log.
The problem is that none of my events ever show up in the events dumped out.
Is there something that we are missing?
Below is the program used to enable the tracing:
#include <sys/trace.h>
#include <errno.h>
int main(int argc, char **argv)
{
/* set wide emitting mode */
if( TraceEvent(_NTO_TRACE_SETALLCLASSESWIDE) == -1 )
printf( “Error1\n” );
/* include all classes */
if( TraceEvent(_NTO_TRACE_ADDALLCLASSES)== -1 )
printf( “Error2\n” );
/* start tracing */
if( TraceEvent(_NTO_TRACE_START)== -1)
printf( “Error3 errno=%d\n”, errno );
return (0);
}
Sincerely
Allan