Pull perf updates/fixes from Ingo Molnar: "Mostly tooling updates, but also two kernel fixes: a call chain handling robustness fix and an x86 PMU driver event definition fix" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/callchain: Force USER_DS when invoking perf_callchain_user() tools build: Fixup sched_getcpu feature test perf tests kmod-path: Don't fail if compressed modules aren't supported perf annotate: Fix AArch64 comment char perf tools: Fix spelling mistakes perf/x86: Fix Broadwell-EP DRAM RAPL events perf config: Refactor a duplicated code for obtaining config file name perf symbols: Allow user probes on versioned symbols perf symbols: Accept symbols starting at address 0 tools lib string: Adopt prefixcmp() from perf and subcmd perf units: Move parse_tag_value() to units.[ch] perf ui gtk: Move gtk .so name to the only place where it is used perf tools: Move HAS_BOOL define to where perl headers are used perf memswap: Split the byteswap memory range wrappers from util.[ch] perf tools: Move event prototypes from util.h to event.h perf buildid: Move prototypes from util.h to build-id.htirimbino
commit
e0c4a5fc75
@ -0,0 +1,24 @@ |
||||
#include <byteswap.h> |
||||
#include "memswap.h" |
||||
#include <linux/types.h> |
||||
|
||||
void mem_bswap_32(void *src, int byte_size) |
||||
{ |
||||
u32 *m = src; |
||||
while (byte_size > 0) { |
||||
*m = bswap_32(*m); |
||||
byte_size -= sizeof(u32); |
||||
++m; |
||||
} |
||||
} |
||||
|
||||
void mem_bswap_64(void *src, int byte_size) |
||||
{ |
||||
u64 *m = src; |
||||
|
||||
while (byte_size > 0) { |
||||
*m = bswap_64(*m); |
||||
byte_size -= sizeof(u64); |
||||
++m; |
||||
} |
||||
} |
@ -0,0 +1,7 @@ |
||||
#ifndef PERF_MEMSWAP_H_ |
||||
#define PERF_MEMSWAP_H_ |
||||
|
||||
void mem_bswap_64(void *src, int byte_size); |
||||
void mem_bswap_32(void *src, int byte_size); |
||||
|
||||
#endif /* PERF_MEMSWAP_H_ */ |
Loading…
Reference in new issue