mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
x86/oprofile: introduce oprofile_add_data64()
The IBS implemention writes 64 bit register values to the cpu buffer by writing two 32 values using oprofile_add_data(). This patch introduces oprofile_add_data64() to write a single 64 bit value to the buffer. Signed-off-by: Robert Richter <[email protected]>
This commit is contained in:
parent
c572ae4efd
commit
51563a0e56
3 changed files with 25 additions and 18 deletions
|
|
@ -406,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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue