Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: compudj@krystal.dyndns.org (Mathieu Desnoyers)
Subject: [ltt-dev] [PATCH] Fix initial state bug
Date: Thu, 25 Nov 2010 20:07:40 -0500	[thread overview]
Message-ID: <20101126010740.GB21131@Krystal> (raw)
In-Reply-To: <20101125144944.13145zh3c6at16w4@www.usherbrooke.ca>

* Francis Giraldeau (Francis.Giraldeau at USherbrooke.ca) wrote:
> Mathieu Desnoyers <compudj at krystal.dyndns.org> a ?crit?:
>>> +/* get a given quark from lttng module enum value */
>>> +#define ltt_enum_quark(e, f, names)  
>>> (g_quark_from_string(names[ltt_event_get_unsigned(e, f)]))
>>
>> Please use a static inline rather than a preprocessor macro for this. It
>> comes with type checking and removes odd macro corner-cases.
>
> Ok, done.
>
>>> @@ -3503,11 +3538,9 @@ static gboolean enum_process_state(void  
>>> *hook_data, void *call_data)
>>>  				es->t = LTTV_STATE_MODE_UNKNOWN;
>>>  				es->s = LTTV_STATE_UNNAMED;
>>>  				es->n = LTTV_STATE_SUBMODE_UNKNOWN;
>>> -#if 0
>>>  				es->t = LTTV_STATE_SYSCALL;
>>>  				es->s = status;
>>>  				es->n = submode;
>>> -#endif //0
>>
>> Hrm ? you're leaving the unknown and then changing the state ? What for ?
>>
>> How do you know the thread is not in interrupt or trap ? (see comment
>> above)
>
> Double state change is obviously wrong, my mistake. I removed those  
> changes. As I understand, we don't know for sure the initial state from 
> the state dump. The actual initial process state is known at the first 
> occurrence of an event in the trace, isn't?

Partly, yes. And some state is known by a combination of the state dump
process listing and the fact that we wait for a "grace period" to occur
before we issue the "statedump_end" event. This ensures that a kernel
worker thread has run on every CPU on the system.

We should take time to discuss all this, ideally with Julien. This is
definitely not an easy problem. We might have to generate a few
synthetic workloads under tracing to figure out the scenarios we have to
deal with.

Thanks,

Mathieu

>
> Francis
>
>
>
> _______________________________________________
> 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



  reply	other threads:[~2010-11-26  1:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-25 16:00 francis.giraldeau
2010-11-25 16:16 ` Mathieu Desnoyers
2010-11-25 19:49   ` Francis Giraldeau
2010-11-26  1:07     ` Mathieu Desnoyers [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-11-25 15:29 Francis Giraldeau
2010-11-25 15:29 ` Francis Giraldeau
2010-11-25 15:29 ` Francis Giraldeau
2010-11-25 15:39 ` Yannick Brosseau
2010-11-25 16:00   ` Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101126010740.GB21131@Krystal \
    --to=compudj@krystal.dyndns.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox