Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* [MI] Extending -list-thread-groups --available to show cores
@ 2009-11-09  1:36 Vladimir Prus
  2009-11-09 16:17 ` Marc Khouzam
  2009-11-17  7:45 ` Vladimir Prus
  0 siblings, 2 replies; 13+ messages in thread
From: Vladimir Prus @ 2009-11-09  1:36 UTC (permalink / raw)
  To: gdb


Current GDB has a MI command -list-thread-groups to nagivate
the hierarchy of the debugged thing. This command also the the
--available option that cause GDB to report the processes that
can be attached to, as opposed to processes currently being
debugged.

We were recently asked to slightly extend the returned information
to include the core where each thread runs. Such information is
of little use for typical Linux application, since threads are
migrated between cores. However, it's useful for both custom 
Linux applications that specifically pin threads to specific cores,
and for embedded systems. Therefore, I plan to add a new field
to the thread information that is output by 
-list-thread-groups --available, named 'core' that will give the
number of the core. E.g.

	-list-thread-groups
	^done,groups=[{id="17",type="process",pid="yyy",num_children="2",cores=[1,2]}]
	-list-thread-groups 17
	^done,threads=[{id="2",target-id="Thread 0xb7e14b90 (LWP 21257)",cores=[1]
	   frame={level="0",addr="0xffffe410",func="__kernel_vsyscall",args=[]},state="running"},

Related to that, it would be somewhat inefficient to issue -list-thread-groups
for every avaialable process to discover the full list of threads on specific
core, so it would be nice to pass several thread groups, like so:

	-list-thread-groups 17 18
	^done,groups=[{id="17", types="process", ..., 
                   threads=[{id="2",target-id="Thread 0xb7e14b90 (LWP 21257)",cores=[1]}]},
			      {id="18", types="process", ..., 

Finally, we were asked to make the *stopped notification to report the core on which
the stop has happened, as additional field.

While those changes seem relatively minor and in line with previous MI developments,
I wanted to pass them here. If there are no objections, I'll work in implementation
during coming weeks.

Thanks,
Volodya


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

end of thread, other threads:[~2009-11-17 13:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-09  1:36 [MI] Extending -list-thread-groups --available to show cores Vladimir Prus
2009-11-09 16:17 ` Marc Khouzam
2009-11-09 16:25   ` Vladimir Prus
2009-11-09 16:42     ` Marc Khouzam
2009-11-09 17:20       ` Vladimir Prus
2009-11-09 17:33         ` Marc Khouzam
2009-11-09 20:02           ` Marc Khouzam
2009-11-16 14:52           ` Vladimir Prus
2009-11-16 17:55             ` Vladimir Prus
2009-11-17  7:45 ` Vladimir Prus
2009-11-17 13:49   ` Marc Khouzam
2009-11-19  6:44     ` Vladimir Prus
2009-11-19  7:11       ` Marc Khouzam

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