From: Alain Magloire <alain@qnx.com>
To: Denis PILAT <denis.pilat@st.com>
Cc: Daniel Jacobowitz <drow@false.org>,
nickrob@snap.net.nz, gdb@sourceware.org
Subject: RE: info thread
Date: Thu, 28 Sep 2006 14:35:00 -0000 [thread overview]
Message-ID: <3518719F06577C4F85DA618E3C37AB9106B136FA@nimbus.ott.qnx.com> (raw)
> From: Denis PILAT [mailto:denis.pilat@st.com]
> Sent: Wednesday, September 27, 2006 10:18 AM
> To: Alain Magloire
> Cc: Daniel Jacobowitz; nickrob@snap.net.nz; gdb@sourceware.org
> Subject: Re: info thread
>
>
>
> Alain Magloire wrote:
>
> >
> >>I think you're thinking of -thread-list-ids. Ah, this is mi/674.
> >>It's also mi/1040. Both of which suggest *stopped :-)
> >>
> >>We could add the thread to -thread-list-ids, too.
> >>
> >>Something to keep in mind: the thread "extra info" is expensive to
> >>collect on some platforms, e.g. requires asking the remote stub for
> >>details on each individual thread.
> >>
> >>
> >
> >Noted, but some platforms put some extra stuff in the output of "info
> >threads" like thread names, states, mutexes etc ... this information is
> then
> >retrieve by the IDE and shownn to the user.
> >
> Yes but to display this "extra stuffs" they have to customize their
> Eclipse (or any UI) to implement a parser for that.
>
> I think it will be more generic and cost less (in term of execution
> time) if "extra information" could be accessible thru an other mi
> command than -thread-list-ids.
> Generic part of the UI then calls -thread-list-ids
> Targets that want to display more information then just call a more
> complete command like -thread-list-all-threads
> or -thread-info on each thread.
>
>
Agreed, if we the UI views are smart enough to tell which threads are
visible to the users then the implementation can be lazy in getting the
info.
> What I propose is the following:
>
> -thread-list-ids :
> INPUT: none
> OUTPUT:
> o list of IDs
> o Current thread could be the first (or last) item of the list, or
> warned by an asterisk
>
> -thread-list-all-threads
> INPUT: none
> OUTPUT:
> o like -thread-list-ids
> o plus the list of "extra information" per thread
>
>
> -thread-info
> INPUT: thread ID as an optional parameter, if not given the following
> concerns current thread
> OUTPUT:
> o thread ID (could be used to determine which is the current
> thread if not given in parameter)
> o extra information
> o stack frame
>
>
OK. And in term of format, are we talking tuple/list? There was some
inconsistencies in the old MI versions. Also for extra information you are
probably mean "optional extra information" will that be an opaque string or
name=value pairs.
>
> Apart from the debate let me give you some measurements I did on a
> 100 threads program that runs on a board, debugged thru jtag.
> Figures for the "info thread" CLI command only:
> 70 % of the time is spent in getting the stack frame for all threads
> 1% on the "extra info"
> 29% on other stuff out of the loop that collect thread above information.
>
> Stack frame is the one that takes the most since it requires to switch
> the current thread and print the stack. Switching takes 60% of that
> time. Moreover extra information are reduced for our target.
>
> Please note that the total time is 7.2 seconds for this example !
On some architecture "info threads" can make things extremely slow, since
the IDE will have to poll at every step to discover created/destroyed
threads. For the long run we should probably look at notifications.
next reply other threads:[~2006-09-28 14:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-28 14:35 Alain Magloire [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-09-25 17:27 Alain Magloire
2006-09-25 17:36 ` Daniel Jacobowitz
2006-09-27 14:18 ` Denis PILAT
2006-09-25 16:25 Alain Magloire
2006-09-25 15:25 Alain Magloire
2006-09-25 15:31 ` Daniel Jacobowitz
2006-09-18 21:49 Nick Roberts
2006-09-19 13:16 ` Denis PILAT
2006-09-19 14:23 ` Daniel Jacobowitz
2006-09-19 20:55 ` Nick Roberts
2006-09-19 21:03 ` Daniel Jacobowitz
2006-09-23 19:06 ` Mark Kettenis
2006-09-23 21:59 ` Daniel Jacobowitz
2006-09-25 14:49 ` Denis PILAT
2006-09-25 14:52 ` Daniel Jacobowitz
2006-09-25 18:39 ` Michael Snyder
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=3518719F06577C4F85DA618E3C37AB9106B136FA@nimbus.ott.qnx.com \
--to=alain@qnx.com \
--cc=denis.pilat@st.com \
--cc=drow@false.org \
--cc=gdb@sourceware.org \
--cc=nickrob@snap.net.nz \
/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