diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-06-17 21:10:28 +0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-06-17 21:10:28 +0400 |
| commit | 4f6e1fe1d8ba3d9f4fb52dd006da9714d75243cf (patch) | |
| tree | e528e185d3f166c9bc7d628dce87c366e5fe5151 /drivers/oprofile/cpu_buffer.c | |
| parent | 65795efbd380a832ae508b04dba8f8e53f0b84d9 (diff) | |
| parent | b72f7fa9788c85866da10d7b2091077397018b7a (diff) | |
| download | linux-4f6e1fe1d8ba3d9f4fb52dd006da9714d75243cf.tar.xz | |
Merge branch 'auto' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into oprofile
Diffstat (limited to 'drivers/oprofile/cpu_buffer.c')
| -rw-r--r-- | drivers/oprofile/cpu_buffer.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c index 242257b19441..a7aae24f2889 100644 --- a/drivers/oprofile/cpu_buffer.c +++ b/drivers/oprofile/cpu_buffer.c @@ -21,7 +21,6 @@ #include <linux/sched.h> #include <linux/oprofile.h> -#include <linux/vmalloc.h> #include <linux/errno.h> #include "event_buffer.h" @@ -407,6 +406,21 @@ int oprofile_add_data(struct op_entry *entry, unsigned long val) return op_cpu_buffer_add_data(entry, val); } +int oprofile_add_data64(struct op_entry *entry, u64 val) +{ + if (!entry->event) + return 0; + if (op_cpu_buffer_get_size(entry) < 2) + /* + * the function returns 0 to indicate a too small + * buffer, even if there is some space left + */ + return 0; + if (!op_cpu_buffer_add_data(entry, (u32)val)) + return 0; + return op_cpu_buffer_add_data(entry, (u32)(val >> 32)); +} + int oprofile_write_commit(struct op_entry *entry) { if (!entry->event) |
