aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 28304677c73..e2cebc053bd 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -44,7 +44,7 @@ static long samples;
44static struct timeval last_read; 44static struct timeval last_read;
45static struct timeval this_read; 45static struct timeval this_read;
46 46
47static __u64 bytes_written; 47static u64 bytes_written;
48 48
49static struct pollfd event_array[MAX_NR_CPUS * MAX_COUNTERS]; 49static struct pollfd event_array[MAX_NR_CPUS * MAX_COUNTERS];
50 50
@@ -56,18 +56,18 @@ static struct perf_file_header file_header;
56 56
57struct mmap_event { 57struct mmap_event {
58 struct perf_event_header header; 58 struct perf_event_header header;
59 __u32 pid; 59 u32 pid;
60 __u32 tid; 60 u32 tid;
61 __u64 start; 61 u64 start;
62 __u64 len; 62 u64 len;
63 __u64 pgoff; 63 u64 pgoff;
64 char filename[PATH_MAX]; 64 char filename[PATH_MAX];
65}; 65};
66 66
67struct comm_event { 67struct comm_event {
68 struct perf_event_header header; 68 struct perf_event_header header;
69 __u32 pid; 69 u32 pid;
70 __u32 tid; 70 u32 tid;
71 char comm[16]; 71 char comm[16];
72}; 72};
73 73
@@ -238,7 +238,7 @@ static void pid_synthesize_comm_event(pid_t pid, int full)
238 238
239 comm_ev.pid = pid; 239 comm_ev.pid = pid;
240 comm_ev.header.type = PERF_EVENT_COMM; 240 comm_ev.header.type = PERF_EVENT_COMM;
241 size = ALIGN(size, sizeof(__u64)); 241 size = ALIGN(size, sizeof(u64));
242 comm_ev.header.size = sizeof(comm_ev) - (sizeof(comm_ev.comm) - size); 242 comm_ev.header.size = sizeof(comm_ev) - (sizeof(comm_ev.comm) - size);
243 243
244 if (!full) { 244 if (!full) {
@@ -315,7 +315,7 @@ static void pid_synthesize_mmap_samples(pid_t pid)
315 size = strlen(execname); 315 size = strlen(execname);
316 execname[size - 1] = '\0'; /* Remove \n */ 316 execname[size - 1] = '\0'; /* Remove \n */
317 memcpy(mmap_ev.filename, execname, size); 317 memcpy(mmap_ev.filename, execname, size);
318 size = ALIGN(size, sizeof(__u64)); 318 size = ALIGN(size, sizeof(u64));
319 mmap_ev.len -= mmap_ev.start; 319 mmap_ev.len -= mmap_ev.start;
320 mmap_ev.header.size = (sizeof(mmap_ev) - 320 mmap_ev.header.size = (sizeof(mmap_ev) -
321 (sizeof(mmap_ev.filename) - size)); 321 (sizeof(mmap_ev.filename) - size));