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): (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
Re: Prosess [pid] in timeline (tracelogger in ring mode)  
The beginning of each timestamp must aligned to the size of a 'simple' event.
The safest way to do this involves parsing the header to find the beginning
of events, and then doing a modulo on the event size to make sure the rest
of the events are 'whole'.

Colin

Matthias Ecker wrote:
> 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
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post6482
> 

-- 
cburgess@qnx.com
Re: Prosess [pid] in timeline (tracelogger in ring mode)  
Hi all,

I know it has been a while since the last entry to the post but I tried the example code on 6.4.1 and it didn't work. 
The IDE reported my file as being corrupted. 
Can anybody send me a version of the code working with 6.4.1 ?

Tobias
AW: Prosess [pid] in timeline (tracelogger in ring mode)  
I think you have to check your implementation.
It is still working for me, without any change to my original code.
trace was done on a 6.4.1 system and I am using IDE 4.6.1 build 20100115

/hp
 

>-----Ursprüngliche Nachricht-----
>Von: Tobias Schwarz [mailto:community-noreply@qnx.com] 
>Gesendet: Donnerstag, 18. März 2010 23:22
>An: general-ide
>Betreff: Re: Prosess [pid] in timeline (tracelogger in ring mode)
>
>Hi all,
>
>I know it has been a while since the last entry to the post 
>but I tried the example code on 6.4.1 and it didn't work. The 
>IDE reported my file as being corrupted. 
>Can anybody send me a version of the code working with 6.4.1 ?
>
>Tobias
>
>
>
>_______________________________________________
>
>General
>http://community.qnx.com/sf/go/post49961
>
>