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

Robert Wisniewski bob at watson.ibm.com
Tue Sep 13 06:55:53 EST 2005


Tao,
     When you say you didn't find it in the trace output file, how did you
determine that?  If you used the traceTool to turn the binary file to ascii
then you would have needed to recompile the tracetool to pick up the new
include file with the new event.  If you did that and are still not seeing
it, then I might suggest you put another (alrady defined) user event in and 
make sure you see it.  That would let us know whether it was that
particular event or soemthing else in the way you are running/setup.  Try
those things out and see.  I will be traveling tomorrow so will not have
access to email.  But if these pointers didn't fix anything, respond with
this information and we'll see what we can do figure this out.

Robert Wisniewski
The K42 MP OS Project
Advanced Operating Systems
IBM T.J. Watson Research Center
914-945-3181
http://www.research.ibm.com/K42/
bob at watson.ibm.com

----

Tao Huang writes:
 > 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



More information about the K42-discussion mailing list