LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [rfc] x86, bts: improve X86_PTRACE_BTS help text
@ 2008-10-15 16:29 Markus Metzger
  2008-10-16  6:57 ` Roland Dreier
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Metzger @ 2008-10-15 16:29 UTC (permalink / raw)
  To: linux-kernel, mingo, tglx, rdreier; +Cc: markus.t.metzger, markus.t.metzger

Improve the help text on the BTS config option.
Remove the DS config option - set it implicitly, when BTS is selected.

Signed-off-by: markus.t.metzger@intel.com

----
Index: gits/arch/x86/Kconfig.cpu
===================================================================
--- gits.orig/arch/x86/Kconfig.cpu	2008-10-15 09:02:47.000000000 +0200
+++ gits/arch/x86/Kconfig.cpu	2008-10-15 12:59:21.000000000 +0200
@@ -513,19 +513,19 @@
 	  If unsure, say N.
 
 config X86_DS
-	bool "Debug Store support"
-	default y
-	help
-	  Add support for Debug Store.
-	  This allows the kernel to provide a memory buffer to the hardware
-	  to store various profiling and tracing events.
+	def_bool X86_PTRACE_BTS
+	depends on X86_DEBUGCTLMSR
 
 config X86_PTRACE_BTS
-	bool "ptrace interface to Branch Trace Store"
+	bool "Branch Trace Store"
 	default y
-	depends on (X86_DS && X86_DEBUGCTLMSR)
+	depends on X86_DEBUGCTLMSR
 	help
-	  Add a ptrace interface to allow collecting an execution trace
-	  of the traced task.
-	  This collects control flow changes in a (cyclic) buffer and allows
-	  debuggers to fill in the gaps and show an execution trace of the debuggee.
+	  This adds a ptrace interface to the hardware's branch trace store.
+
+	  Debuggers may use it to collect an execution trace of the debugged
+	  application in order to answer the question 'how did I get here?'.
+	  Debuggers may trace user mode as well as kernel mode.
+
+	  Say Y unless there is no application development on this machine
+	  and you want to save a small amount of code size.
---------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen Germany
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 Ust.-IdNr.
VAT Registration No.: DE129385895
Citibank Frankfurt (BLZ 502 109 00) 600119052

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


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

* Re: [rfc] x86, bts: improve X86_PTRACE_BTS help text
  2008-10-15 16:29 [rfc] x86, bts: improve X86_PTRACE_BTS help text Markus Metzger
@ 2008-10-16  6:57 ` Roland Dreier
  2008-10-16  7:12   ` Metzger, Markus T
  0 siblings, 1 reply; 3+ messages in thread
From: Roland Dreier @ 2008-10-16  6:57 UTC (permalink / raw)
  To: Markus Metzger; +Cc: linux-kernel, mingo, tglx, markus.t.metzger

Thanks for improving the help text; it looks much better.

One comment:

 >  config X86_DS
 > -	bool "Debug Store support"
 > -	default y
 > -	help
 > -	  Add support for Debug Store.
 > -	  This allows the kernel to provide a memory buffer to the hardware
 > -	  to store various profiling and tracing events.
 > +	def_bool X86_PTRACE_BTS
 > +	depends on X86_DEBUGCTLMSR

using def_bool here to get this turned on if X86_PTRACE_BTS is set
doesn't seem scalable to more uses of X86_DS.  I would have thought that
having X86_PTRACE_BTS select X86_DS would make more sense.

Or are other users of X86_DS not planned?  In which case should there be
a separate X86_DS option at all?

 > +	  This adds a ptrace interface to the hardware's branch trace store.
 > +
 > +	  Debuggers may use it to collect an execution trace of the debugged
 > +	  application in order to answer the question 'how did I get here?'.
 > +	  Debuggers may trace user mode as well as kernel mode.
 > +
 > +	  Say Y unless there is no application development on this machine
 > +	  and you want to save a small amount of code size.

This looks much better -- someone like me could read this and make an
informed decision about the config option.

Thanks,
  Roland

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

* RE: [rfc] x86, bts: improve X86_PTRACE_BTS help text
  2008-10-16  6:57 ` Roland Dreier
@ 2008-10-16  7:12   ` Metzger, Markus T
  0 siblings, 0 replies; 3+ messages in thread
From: Metzger, Markus T @ 2008-10-16  7:12 UTC (permalink / raw)
  To: Roland Dreier; +Cc: linux-kernel, mingo, tglx, markus.t.metzger

>-----Original Message-----
>From: Roland Dreier [mailto:rdreier@cisco.com] 
>Sent: Donnerstag, 16. Oktober 2008 08:57
>To: Metzger, Markus T

> >  config X86_DS
[...]
> > +	def_bool X86_PTRACE_BTS
> > +	depends on X86_DEBUGCTLMSR
>
>using def_bool here to get this turned on if X86_PTRACE_BTS is set
>doesn't seem scalable to more uses of X86_DS.  I would have 
>thought that
>having X86_PTRACE_BTS select X86_DS would make more sense.

We do plan other users. Perfmon2, for example, will be using it.

I fail to see the difference between the two models.
In one case, new users would need to select X86_DS.
In the other case, new users would need to extend the def_bool clause of
X86_DS.

The documentation recommended to use select carefuly, that's why I
picked the other one.

If people think that select is clearer, I will change it.


> > +	  This adds a ptrace interface to the hardware's branch 
>trace store.
> > +
> > +	  Debuggers may use it to collect an execution trace of 
>the debugged
> > +	  application in order to answer the question 'how did 
>I get here?'.
> > +	  Debuggers may trace user mode as well as kernel mode.
> > +
> > +	  Say Y unless there is no application development on 
>this machine
> > +	  and you want to save a small amount of code size.
>
>This looks much better -- someone like me could read this and make an
>informed decision about the config option.

Good. I will send a patch if there is no more feedback on the select vs.
def_bool topic today.

regards,
markus.
---------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen Germany
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 Ust.-IdNr.
VAT Registration No.: DE129385895
Citibank Frankfurt (BLZ 502 109 00) 600119052

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


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

end of thread, other threads:[~2008-10-16  7:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-15 16:29 [rfc] x86, bts: improve X86_PTRACE_BTS help text Markus Metzger
2008-10-16  6:57 ` Roland Dreier
2008-10-16  7:12   ` Metzger, Markus T

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).