Thread: [perfmon2] [PATCH] Add perfmon_debug kernel parameter for early startup messages
Status: Beta
Brought to you by:
seranian
From: Robert R. <rob...@am...> - 2008-03-06 13:54:18
|
The patch allows it to enable debug messages in the early startup phase. Before, the recompilation of the Kernel with a modified debug init value was necessary. Signed-off-by: Robert Richter <rob...@am...> --- Documentation/kernel-parameters.txt | 3 +++ perfmon/perfmon_sysfs.c | 8 ++++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index c417877..fc39207 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -1401,6 +1401,9 @@ and is between 256 and 4096 characters. It is defined in the file Format: { 0 | 1 } See arch/parisc/kernel/pdc_chassis.c + perfmon_debug [PERFMON] Enables Perfmon debug messages. Needed + to see traces of the early startup startup phase. + pf. [PARIDE] See Documentation/paride.txt. diff --git a/perfmon/perfmon_sysfs.c b/perfmon/perfmon_sysfs.c index 279c6ed..b8d6cca 100644 --- a/perfmon/perfmon_sysfs.c +++ b/perfmon/perfmon_sysfs.c @@ -277,6 +277,14 @@ static ssize_t arg_size_store(void *info, const char *buf, size_t sz) return strnlen(buf, PAGE_SIZE); } +static int __init enable_debug(char *str) +{ + pfm_controls.debug = 1; + PFM_INFO("debug output enabled\n"); + return 1; +} +__setup("perfmon_debug", enable_debug); + /* * /sys/kernel/perfmon attributes */ -- 1.5.3.7 |
From: stephane e. <er...@go...> - 2008-03-11 16:36:03
|
Robert, How does this patch works in regards with printk throttling? On Thu, Mar 6, 2008 at 6:53 AM, Robert Richter <rob...@am...> wrote: > The patch allows it to enable debug messages in the early startup > phase. Before, the recompilation of the Kernel with a modified debug > init value was necessary. > > Signed-off-by: Robert Richter <rob...@am...> > --- > Documentation/kernel-parameters.txt | 3 +++ > perfmon/perfmon_sysfs.c | 8 ++++++++ > 2 files changed, 11 insertions(+), 0 deletions(-) > > diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt > index c417877..fc39207 100644 > --- a/Documentation/kernel-parameters.txt > +++ b/Documentation/kernel-parameters.txt > @@ -1401,6 +1401,9 @@ and is between 256 and 4096 characters. It is defined in the file > Format: { 0 | 1 } > See arch/parisc/kernel/pdc_chassis.c > > + perfmon_debug [PERFMON] Enables Perfmon debug messages. Needed > + to see traces of the early startup startup phase. > + > pf. [PARIDE] > See Documentation/paride.txt. > > diff --git a/perfmon/perfmon_sysfs.c b/perfmon/perfmon_sysfs.c > index 279c6ed..b8d6cca 100644 > --- a/perfmon/perfmon_sysfs.c > +++ b/perfmon/perfmon_sysfs.c > @@ -277,6 +277,14 @@ static ssize_t arg_size_store(void *info, const char *buf, size_t sz) > return strnlen(buf, PAGE_SIZE); > } > > +static int __init enable_debug(char *str) > +{ > + pfm_controls.debug = 1; > + PFM_INFO("debug output enabled\n"); > + return 1; > +} > +__setup("perfmon_debug", enable_debug); > + > /* > * /sys/kernel/perfmon attributes > */ > -- > 1.5.3.7 > > > |
From: Robert R. <rob...@am...> - 2008-03-17 14:58:50
|
On 11.03.08 09:36:09, stephane eranian wrote: > How does this patch works in regards with printk throttling? > > +static int __init enable_debug(char *str) > > +{ > > + pfm_controls.debug = 1; > > + PFM_INFO("debug output enabled\n"); > > + return 1; > > +} > > +__setup("perfmon_debug", enable_debug); pfm_controls.debug has impact only to the PFM_DBG() macro that is using printk_ratelimit(). So debug messages work as usual. -Robert -- Advanced Micro Devices, Inc. Operating System Research Center email: rob...@am... |
From: stephane e. <er...@go...> - 2008-03-17 15:12:30
|
Robert, On Mon, Mar 17, 2008 at 7:52 AM, Robert Richter <rob...@am...> wrote: > On 11.03.08 09:36:09, stephane eranian wrote: > > > How does this patch works in regards with printk throttling? > > > > > +static int __init enable_debug(char *str) > > > +{ > > > + pfm_controls.debug = 1; > > > + PFM_INFO("debug output enabled\n"); > > > + return 1; > > > +} > > > +__setup("perfmon_debug", enable_debug); > > pfm_controls.debug has impact only to the PFM_DBG() macro that is > using printk_ratelimit(). So debug messages work as usual. > I know that. But is throttling also enabled during boot. If so, you may not get all the output. That's what I am curious about. |
From: Robert R. <rob...@am...> - 2008-03-17 16:01:04
|
On 17.03.08 08:12:28, stephane eranian wrote: > Robert, > > On Mon, Mar 17, 2008 at 7:52 AM, Robert Richter <rob...@am...> wrote: > > On 11.03.08 09:36:09, stephane eranian wrote: > > > > > How does this patch works in regards with printk throttling? > > > > > > > > +static int __init enable_debug(char *str) > > > > +{ > > > > + pfm_controls.debug = 1; > > > > + PFM_INFO("debug output enabled\n"); > > > > + return 1; > > > > +} > > > > +__setup("perfmon_debug", enable_debug); > > > > pfm_controls.debug has impact only to the PFM_DBG() macro that is > > using printk_ratelimit(). So debug messages work as usual. > > > I know that. But is throttling also enabled during boot. If so, you may > not get all the output. That's what I am curious about. It seems that rate limiting is enabled per default. However, you should see a 'messages suppressed' entry. With rate limiting it was sufficient to me for debugging the PMU setup. -Robert -- Advanced Micro Devices, Inc. Operating System Research Center email: rob...@am... |
From: stephane e. <er...@go...> - 2008-03-21 22:24:14
|
Robert, Patch has been applied. Thanks. On Thu, Mar 6, 2008 at 2:53 PM, Robert Richter <rob...@am...> wrote: > The patch allows it to enable debug messages in the early startup > phase. Before, the recompilation of the Kernel with a modified debug > init value was necessary. > > Signed-off-by: Robert Richter <rob...@am...> > --- > Documentation/kernel-parameters.txt | 3 +++ > perfmon/perfmon_sysfs.c | 8 ++++++++ > 2 files changed, 11 insertions(+), 0 deletions(-) > > diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt > index c417877..fc39207 100644 > --- a/Documentation/kernel-parameters.txt > +++ b/Documentation/kernel-parameters.txt > @@ -1401,6 +1401,9 @@ and is between 256 and 4096 characters. It is defined in the file > Format: { 0 | 1 } > See arch/parisc/kernel/pdc_chassis.c > > + perfmon_debug [PERFMON] Enables Perfmon debug messages. Needed > + to see traces of the early startup startup phase. > + > pf. [PARIDE] > See Documentation/paride.txt. > > diff --git a/perfmon/perfmon_sysfs.c b/perfmon/perfmon_sysfs.c > index 279c6ed..b8d6cca 100644 > --- a/perfmon/perfmon_sysfs.c > +++ b/perfmon/perfmon_sysfs.c > @@ -277,6 +277,14 @@ static ssize_t arg_size_store(void *info, const char *buf, size_t sz) > return strnlen(buf, PAGE_SIZE); > } > > +static int __init enable_debug(char *str) > +{ > + pfm_controls.debug = 1; > + PFM_INFO("debug output enabled\n"); > + return 1; > +} > +__setup("perfmon_debug", enable_debug); > + > /* > * /sys/kernel/perfmon attributes > */ > -- > 1.5.3.7 > > > |