Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Prosess [pid] in timeline (tracelogger in ring mode): Page 1 of 2 (13 Items)
   
Prosess [pid] in timeline (tracelogger in ring mode)  
IDE401
when viewing a kev file generated from tracelogger in ring mode we see the string "Prosess" followed by [somepid] in 
timeline instead of OrigProcessName [pid].  Is it planed that we can change/edit the string
"Process" manually to real process name the case set, that there is a pretty  good reason for the things actually 
displayed as  "Prosess [pid]" in the timeline view ?

Thanks,
Jeevan
Re: Prosess [pid] in timeline (tracelogger in ring mode)  
The reason for this is quite simple.
TraceEvents like "CreateProcessName" which the IDE takes the information about process names from, are triggered only 
once on tracelogger start/attach to procnto-instr by procnto itself.
If your trace now runs long enough, these events will be overwritten because you're running in "ring mode".
I don't now if QNX has a plan for making process names editable int the IDE, but what you can do, is to append 
appropriate "CreateProcessName" events to the tracefile, this is a bit tricky - but it works (we do this for threadnames
 on 6.3.0 which has no threadname support).

-hp
Re: Prosess [pid] in timeline (tracelogger in ring mode)  
Hey HP - why not extend your util to add the process names too - then you could post it to the bazaar project. :-)

Colin

Hans-Peter Reicher wrote:
> The reason for this is quite simple.
> TraceEvents like "CreateProcessName" which the IDE takes the information 
> about process names from, are triggered only once on tracelogger 
> start/attach to procnto-instr by procnto itself.
> 
> If your trace now runs long enough, these events will be overwritten 
> because you're running in "ring mode".
> I don't now if QNX has a plan for making process names editable int the 
> IDE, but what you can do, is to append appropriate "CreateProcessName" 
> events to the tracefile, this is a bit tricky - but it works (we do this 
> for threadnames on 6.3.0 which has no threadname support).
> 
> -hp
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post4919
> 

-- 
cburgess@qnx.com
Re: Prosess [pid] in timeline (tracelogger in ring mode)  
that's already on the way, it's one of the next tasks of Thomas S.

hope you had a good flight.
Re: Prosess [pid] in timeline (tracelogger in ring mode)  
I tryed to find an example on how to add a ProcessName Event at the end of a ringbuffered kernel event trace, but I 
couldn't find one. 
I managed to insert a PROCCREATE_NAME Event, but there is only one row in the traceprinter output (containing the ppid 
and pid, but not the name).

Could someone please post a small example, how add the process names?

Thank You! 
Re: Prosess [pid] in timeline (tracelogger in ring mode)  
I have some code around that adds thread names.  I can send that your way and
you should be able to adapt it to your needs.

Let me fish around for a few minutes...

Matthias Ecker wrote:
> I tryed to find an example on how to add a ProcessName Event at the end 
> of a ringbuffered kernel event trace, but I couldn't find one.
> 
> I managed to insert a PROCCREATE_NAME Event, but there is only one row 
> in the traceprinter output (containing the ppid and pid, but not the name).
> 
> Could someone please post a small example, how add the process names?
> 
> Thank You!
> 
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post5736
> 

-- 
cburgess@qnx.com
Re: Prosess [pid] in timeline (tracelogger in ring mode)  
Did you already find an example? 

Thank You!
Re: Prosess [pid] in timeline (tracelogger in ring mode)  
stay tuned, coming soon
I have to strip the example down to the essentials
/hp
Re: Prosess [pid] in timeline (tracelogger in ring mode)  
okey dokey, here we go ...
see the attachment, it is an example of how to do this.
I didn't test this one 'til now - it'san adaption of a different function which is inserting thread names for traces of 
an 6.3.0 system.
But it should work - maybe except of compilation errors.
you will need to provide the list of names,  pids and ppids.
I hope the source is self explaining, if not and you have more question - just ask
/hp
Attachment: Text append_process_names.cpp 2.37 KB
Re: Prosess [pid] in timeline (tracelogger in ring mode)  
Thanks a lot! 
the source is pretty much self explaning. I did not know one has to mess around with this beg, cont & end header thing. 
This was one of the missing pieces...
To get it working for me (on a 6.3.2er version), I had to add 1 to the position of the last timestamp and to the "add 
the process names here" position in the file. Otherwise the timestamp was wrong and thus it was not possible to open the
 .kev file in the ide.

Thanks again! 

Greets,
Matthias Ecker