From 7e75fc3ff4cffd90684816d69838f8730ac3e072 Mon Sep 17 00:00:00 2001 From: Hendrik Brueckner Date: Fri, 13 Dec 2013 11:42:44 +0100 Subject: s390/cpum_sf: Add raw data sampling to support the diagnostic-sampling function Also support the diagnostic-sampling function in addition to the basic-sampling function. Diagnostic-sampling data entries contain hardware model specific sampling data and additional programs are required to analyze the data. To deliver diagnostic-sampling, as well, as basis-sampling data entries to user space, introduce support for sampling "raw data". If this particular perf sampling type (PERF_SAMPLE_RAW) is used, sampling data entries are copied to user space. External programs can then analyze these data. Signed-off-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky --- arch/s390/kernel/perf_event.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'arch/s390/kernel/perf_event.c') diff --git a/arch/s390/kernel/perf_event.c b/arch/s390/kernel/perf_event.c index 60a68261d091..91aa215f947f 100644 --- a/arch/s390/kernel/perf_event.c +++ b/arch/s390/kernel/perf_event.c @@ -139,16 +139,21 @@ static void print_debug_sf(void) int cpu = smp_processor_id(); memset(&si, 0, sizeof(si)); - if (qsi(&si)) { - pr_err("CPU[%i]: CPM_SF: qsi failed\n"); + if (qsi(&si)) return; - } - pr_info("CPU[%i]: CPM_SF: as=%i es=%i cs=%i bsdes=%i dsdes=%i" - " min=%i max=%i cpu_speed=%i tear=%p dear=%p\n", - cpu, si.as, si.es, si.cs, si.bsdes, si.dsdes, - si.min_sampl_rate, si.max_sampl_rate, si.cpu_speed, - si.tear, si.dear); + pr_info("CPU[%i] CPUM_SF: basic=%i diag=%i min=%i max=%i cpu_speed=%i\n", + cpu, si.as, si.ad, si.min_sampl_rate, si.max_sampl_rate, + si.cpu_speed); + + if (si.as) + pr_info("CPU[%i] CPUM_SF: Basic-sampling: a=%i e=%i c=%i" + " bsdes=%i tear=%p dear=%p\n", cpu, + si.as, si.es, si.cs, si.bsdes, si.tear, si.dear); + if (si.ad) + pr_info("CPU[%i] CPUM_SF: Diagnostic-sampling: a=%i e=%i c=%i" + " dsdes=%i tear=%p dear=%p\n", cpu, + si.ad, si.ed, si.cd, si.dsdes, si.tear, si.dear); } void perf_event_print_debug(void) -- cgit v1.2.1