diff options
author | Hendrik Brueckner <brueckner@linux.vnet.ibm.com> | 2013-12-12 11:03:48 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-12-16 08:37:57 -0500 |
commit | 69f239ed335a4b03265cae3ca930f3f166e42e35 (patch) | |
tree | 3a3f8debcc51fa4f1e81f1f15446737bc4e04a41 /arch/s390/include | |
parent | 257608fb4112b4cabefd9e33a4fc2df6b64dca6a (diff) |
s390/cpum_sf: Dynamically extend the sampling buffer if overflows occur
Improve the sampling buffer allocation and add a function to reallocate and
increase the sampling buffer structure. The number of allocated buffer elements
(sample-data-blocks) are accounted. You can control the minimum and maximum
number these sample-data-blocks through the cpum_sfb_size kernel parameter.
The number hardware sample overflows (if any) are also accounted and stored
per perf event. During the PMU disable/enable calls, the accumulated overflow
counter is analyzed and, if necessary, the sampling buffer is dynamically
increased.
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/perf_event.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/s390/include/asm/perf_event.h b/arch/s390/include/asm/perf_event.h index 23d2dfa8201d..99d7f4e333c2 100644 --- a/arch/s390/include/asm/perf_event.h +++ b/arch/s390/include/asm/perf_event.h | |||
@@ -49,6 +49,10 @@ extern unsigned long perf_misc_flags(struct pt_regs *regs); | |||
49 | #define PERF_CPUM_SF_MAX_CTR 1 | 49 | #define PERF_CPUM_SF_MAX_CTR 1 |
50 | #define PERF_EVENT_CPUM_SF 0xB0000UL /* Raw event ID */ | 50 | #define PERF_EVENT_CPUM_SF 0xB0000UL /* Raw event ID */ |
51 | 51 | ||
52 | #define REG_NONE 0 | ||
53 | #define REG_OVERFLOW 1 | ||
54 | #define OVERFLOW_REG(hwc) ((hwc)->extra_reg.config) | ||
55 | #define SFB_ALLOC_REG(hwc) ((hwc)->extra_reg.alloc) | ||
52 | #define TEAR_REG(hwc) ((hwc)->last_tag) | 56 | #define TEAR_REG(hwc) ((hwc)->last_tag) |
53 | #define SAMPL_RATE(hwc) ((hwc)->event_base) | 57 | #define SAMPL_RATE(hwc) ((hwc)->event_base) |
54 | 58 | ||