diff options
Diffstat (limited to 'drivers/oprofile/cpu_buffer.c')
-rw-r--r-- | drivers/oprofile/cpu_buffer.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c index e1bd5a937f6c..7ba39fe20a8a 100644 --- a/drivers/oprofile/cpu_buffer.c +++ b/drivers/oprofile/cpu_buffer.c | |||
@@ -38,13 +38,26 @@ static int work_enabled; | |||
38 | void free_cpu_buffers(void) | 38 | void free_cpu_buffers(void) |
39 | { | 39 | { |
40 | int i; | 40 | int i; |
41 | 41 | ||
42 | for_each_online_cpu(i) { | 42 | for_each_online_cpu(i) { |
43 | vfree(per_cpu(cpu_buffer, i).buffer); | 43 | vfree(per_cpu(cpu_buffer, i).buffer); |
44 | per_cpu(cpu_buffer, i).buffer = NULL; | 44 | per_cpu(cpu_buffer, i).buffer = NULL; |
45 | } | 45 | } |
46 | } | 46 | } |
47 | 47 | ||
48 | unsigned long oprofile_get_cpu_buffer_size(void) | ||
49 | { | ||
50 | return fs_cpu_buffer_size; | ||
51 | } | ||
52 | |||
53 | void oprofile_cpu_buffer_inc_smpl_lost(void) | ||
54 | { | ||
55 | struct oprofile_cpu_buffer *cpu_buf | ||
56 | = &__get_cpu_var(cpu_buffer); | ||
57 | |||
58 | cpu_buf->sample_lost_overflow++; | ||
59 | } | ||
60 | |||
48 | int alloc_cpu_buffers(void) | 61 | int alloc_cpu_buffers(void) |
49 | { | 62 | { |
50 | int i; | 63 | int i; |