[K42-discussion] problem of tracing my event in application code

Tao Huang thuang.cs at gmail.com
Tue Sep 13 04:04:09 EST 2005


Hi,
I'm in Texas A&M University. 
I added an event in User class in k42-trace-xml/traceUser.xml as following 
and recompiled the full-snapshot:

<event name="OS::User::ServiceThread"
description="to capture service thread id">
<layerId value="OS" />
<classId value="User" />
<specifier value="ServiceThread" />
<fields>
<field name="threadid" type="uint64" />
</fields>
<k42Format value='service thread %0[%llx]' />
</event>

Then I call it as following in my application code and recompile the 
application:

#ifdef K42DEF
#include <trace/traceIncs.H>
#endif
...

#ifdef K42DEF
printf("TraceOSUserServiceThread called\n");
SystemSavedState savedArea;
SystemEnter(&savedArea);
TraceOSUserServiceThread((uval64)(Scheduler::GetCurThreadPtr())->getID()); 
SystemExit(&savedArea);
#endif

After I running with /ksys/traceMask set to 0x0000000000000010 (for User), I 
didn't find any tracing record of the event in the trace output file. 
However, the printf stmt above is executed. 

So I wonder whether it's the correct way to trace an event in application 
code (instead of inside of k42)?

Thanks.

Tao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/k42-discussion/attachments/20050912/142df1e9/attachment.htm 


More information about the K42-discussion mailing list