FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 09-12-2012, 07:21 AM
qiaonuohan
 
Default fix a mistake of output for task's state

Hello Dave,

Please refer to the attachment. I think the string of state is not
correct.

--
--
Regards
Qiao Nuohan


--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 09-12-2012, 01:18 PM
Dave Anderson
 
Default fix a mistake of output for task's state

----- Original Message -----
> Hello Dave,
>
> Please refer to the attachment. I think the string of state is not
> correct.
>
> --
> --
> Regards
> Qiao Nuohan
>
>
> --- a/task.c
> +++ b/task.c
> @@ -4633,7 +4633,7 @@ task_state_string(ulong task, char *buf, int verbose)
>
> if (valid_task_state(_TRACING_STOPPED_) &&
> (state & _TRACING_STOPPED_)) {
> - sprintf(buf, "ST");
> + sprintf(buf, "TS");
> valid++;
> set++;
> }
~

Actually it is shown as "ST" on purpose, because it goes back to
older kernels where there was no separate "traced" state, and both
"stopped" and "traced" states were essentially the same. The flag
bits keep changing over time, but the original list of states shown
by "ps" has always been:

crash> help ps
...
5. the task state (RU, IN, UN, ZO, ST, DE, SW).
...

However I agree with you that for clarity's sake the traced state should
be differentiated. But I think it would be better to change it to "TR"
instead of your "TS" suggestion -- note that the verbose translation
used by the "set" command shows "TASK_TRACED":

if (state & _TRACING_STOPPED_)
sprintf(&buf[strlen(buf)], "%sTASK_TRACED",
count++ ? "|" : "");

I'll update the "ps" help page with the new "TR" identifier.

Thanks,
Dave

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 09-12-2012, 03:28 PM
Dave Anderson
 
Default fix a mistake of output for task's state

----- Original Message -----
>
>
> ----- Original Message -----
> > Hello Dave,
> >
> > Please refer to the attachment. I think the string of state is not
> > correct.
> >
> > --
> > --
> > Regards
> > Qiao Nuohan
> >
> >
> > --- a/task.c
> > +++ b/task.c
> > @@ -4633,7 +4633,7 @@ task_state_string(ulong task, char *buf,
> > int verbose)
> >
> > if (valid_task_state(_TRACING_STOPPED_) &&
> > (state & _TRACING_STOPPED_)) {
> > - sprintf(buf, "ST");
> > + sprintf(buf, "TS");
> > valid++;
> > set++;
> > }
> ~
>
> Actually it is shown as "ST" on purpose, because it goes back to
> older kernels where there was no separate "traced" state, and both
> "stopped" and "traced" states were essentially the same. The flag
> bits keep changing over time, but the original list of states shown
> by "ps" has always been:
>
> crash> help ps
> ...
> 5. the task state (RU, IN, UN, ZO, ST, DE, SW).
> ...
>
> However I agree with you that for clarity's sake the traced state should
> be differentiated. But I think it would be better to change it to "TR"
> instead of your "TS" suggestion -- note that the verbose translation
> used by the "set" command shows "TASK_TRACED":
>
> if (state & _TRACING_STOPPED_)
> sprintf(&buf[strlen(buf)], "%sTASK_TRACED",
> count++ ? "|" : "");
>
> I'll update the "ps" help page with the new "TR" identifier.
>
> Thanks,
> Dave

And related to the above, I'll also update the "foreach" command's state
qualifier to accept a "TR" option. As it is now, there's no way to
filter out traced tasks.

Dave

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 05:03 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org