Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [ltt-dev] Getting current process from Log files
@ 2011-04-01  7:54 Radhika Chowdary
  2011-04-01  7:54 ` Radhika Chowdary
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Radhika Chowdary @ 2011-04-01  7:54 UTC (permalink / raw)


Hi

We are implementing importer for LTTng and not using any existing C parser
or linuxtools plugins. I need some info on how we get the currently running
process. From what i see from the existing C parser code i understand its
the sched_schedule event which can help in getting currently running
process. We get the timestamp of when a sched change event happened and add
the process to the stack with timestamp. So any event occuring after the
sched_schedule event we get the process that was scheduled in as currently
running process. Is my understanding currect. If that is true and we get an
event before any sched_schedule or fork events how can we get the process
that generated the event. Would it be the init process?

Thanks
Radhika
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20110401/ba75e611/attachment.htm>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ltt-dev] Getting current process from Log files
  2011-04-01  7:54 [ltt-dev] Getting current process from Log files Radhika Chowdary
  2011-04-01  7:54 ` Radhika Chowdary
@ 2011-04-01  7:54 ` Radhika Chowdary
  2011-04-01 15:18 ` Mathieu Desnoyers
  2 siblings, 0 replies; 4+ messages in thread
From: Radhika Chowdary @ 2011-04-01  7:54 UTC (permalink / raw)


Hi

We are implementing importer for LTTng and not using any existing C parser
or linuxtools plugins. I need some info on how we get the currently running
process. From what i see from the existing C parser code i understand its
the sched_schedule event which can help in getting currently running
process. We get the timestamp of when a sched change event happened and add
the process to the stack with timestamp. So any event occuring after the
sched_schedule event we get the process that was scheduled in as currently
running process. Is my understanding currect. If that is true and we get an
event before any sched_schedule or fork events how can we get the process
that generated the event. Would it be the init process?

Thanks
Radhika
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20110401/ba75e611/attachment-0002.htm>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ltt-dev] Getting current process from Log files
  2011-04-01  7:54 [ltt-dev] Getting current process from Log files Radhika Chowdary
@ 2011-04-01  7:54 ` Radhika Chowdary
  2011-04-01  7:54 ` Radhika Chowdary
  2011-04-01 15:18 ` Mathieu Desnoyers
  2 siblings, 0 replies; 4+ messages in thread
From: Radhika Chowdary @ 2011-04-01  7:54 UTC (permalink / raw)


Hi

We are implementing importer for LTTng and not using any existing C parser
or linuxtools plugins. I need some info on how we get the currently running
process. From what i see from the existing C parser code i understand its
the sched_schedule event which can help in getting currently running
process. We get the timestamp of when a sched change event happened and add
the process to the stack with timestamp. So any event occuring after the
sched_schedule event we get the process that was scheduled in as currently
running process. Is my understanding currect. If that is true and we get an
event before any sched_schedule or fork events how can we get the process
that generated the event. Would it be the init process?

Thanks
Radhika
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20110401/ba75e611/attachment-0003.htm>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ltt-dev] Getting current process from Log files
  2011-04-01  7:54 [ltt-dev] Getting current process from Log files Radhika Chowdary
  2011-04-01  7:54 ` Radhika Chowdary
  2011-04-01  7:54 ` Radhika Chowdary
@ 2011-04-01 15:18 ` Mathieu Desnoyers
  2 siblings, 0 replies; 4+ messages in thread
From: Mathieu Desnoyers @ 2011-04-01 15:18 UTC (permalink / raw)


* Radhika Chowdary (radhika.putty at gmail.com) wrote:
> Hi
> 
> We are implementing importer for LTTng and not using any existing C parser
> or linuxtools plugins.

Why ? You might want to consider looking at libltttraceread and lttv.
These problems have already been solved, and the code is public.

> I need some info on how we get the currently running
> process. From what i see from the existing C parser code i understand its
> the sched_schedule event which can help in getting currently running
> process. We get the timestamp of when a sched change event happened and add
> the process to the stack with timestamp. So any event occuring after the
> sched_schedule event we get the process that was scheduled in as currently
> running process.

.. for the cpu sched_schedule was executed on.

> Is my understanding currect. If that is true and we get an
> event before any sched_schedule or fork events how can we get the process
> that generated the event. Would it be the init process?

Nope. See state.c in lttv. This is why we have unknown state at trace
start, ability to build the state from the events incrementally for
flight recorder mode, and "state dump" machinery to get to a point where
the state is fully known when we have a "normal/discard" trace.

Thanks,

Mathieu

> 
> Thanks
> Radhika

> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev


-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-01 15:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-01  7:54 [ltt-dev] Getting current process from Log files Radhika Chowdary
2011-04-01  7:54 ` Radhika Chowdary
2011-04-01  7:54 ` Radhika Chowdary
2011-04-01 15:18 ` Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox