diff options
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r-- | tools/perf/util/header.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index d07bc134e562..974e7589a6b5 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c | |||
@@ -129,7 +129,7 @@ static int do_write_string(int fd, const char *str) | |||
129 | int ret; | 129 | int ret; |
130 | 130 | ||
131 | olen = strlen(str) + 1; | 131 | olen = strlen(str) + 1; |
132 | len = ALIGN(olen, NAME_ALIGN); | 132 | len = PERF_ALIGN(olen, NAME_ALIGN); |
133 | 133 | ||
134 | /* write len, incl. \0 */ | 134 | /* write len, incl. \0 */ |
135 | ret = do_write(fd, &len, sizeof(len)); | 135 | ret = do_write(fd, &len, sizeof(len)); |
@@ -220,7 +220,7 @@ static int __dsos__write_buildid_table(struct list_head *head, pid_t pid, | |||
220 | if (!pos->hit) | 220 | if (!pos->hit) |
221 | continue; | 221 | continue; |
222 | len = pos->long_name_len + 1; | 222 | len = pos->long_name_len + 1; |
223 | len = ALIGN(len, NAME_ALIGN); | 223 | len = PERF_ALIGN(len, NAME_ALIGN); |
224 | memset(&b, 0, sizeof(b)); | 224 | memset(&b, 0, sizeof(b)); |
225 | memcpy(&b.build_id, pos->build_id, sizeof(pos->build_id)); | 225 | memcpy(&b.build_id, pos->build_id, sizeof(pos->build_id)); |
226 | b.pid = pid; | 226 | b.pid = pid; |
@@ -1532,7 +1532,7 @@ static int perf_header__read_build_ids_abi_quirk(struct perf_header *header, | |||
1532 | struct perf_session *session = container_of(header, struct perf_session, header); | 1532 | struct perf_session *session = container_of(header, struct perf_session, header); |
1533 | struct { | 1533 | struct { |
1534 | struct perf_event_header header; | 1534 | struct perf_event_header header; |
1535 | u8 build_id[ALIGN(BUILD_ID_SIZE, sizeof(u64))]; | 1535 | u8 build_id[PERF_ALIGN(BUILD_ID_SIZE, sizeof(u64))]; |
1536 | char filename[0]; | 1536 | char filename[0]; |
1537 | } old_bev; | 1537 | } old_bev; |
1538 | struct build_id_event bev; | 1538 | struct build_id_event bev; |
@@ -2439,7 +2439,7 @@ int perf_event__synthesize_attr(struct perf_tool *tool, | |||
2439 | int err; | 2439 | int err; |
2440 | 2440 | ||
2441 | size = sizeof(struct perf_event_attr); | 2441 | size = sizeof(struct perf_event_attr); |
2442 | size = ALIGN(size, sizeof(u64)); | 2442 | size = PERF_ALIGN(size, sizeof(u64)); |
2443 | size += sizeof(struct perf_event_header); | 2443 | size += sizeof(struct perf_event_header); |
2444 | size += ids * sizeof(u64); | 2444 | size += ids * sizeof(u64); |
2445 | 2445 | ||
@@ -2537,7 +2537,7 @@ int perf_event__synthesize_event_type(struct perf_tool *tool, | |||
2537 | 2537 | ||
2538 | ev.event_type.header.type = PERF_RECORD_HEADER_EVENT_TYPE; | 2538 | ev.event_type.header.type = PERF_RECORD_HEADER_EVENT_TYPE; |
2539 | size = strlen(ev.event_type.event_type.name); | 2539 | size = strlen(ev.event_type.event_type.name); |
2540 | size = ALIGN(size, sizeof(u64)); | 2540 | size = PERF_ALIGN(size, sizeof(u64)); |
2541 | ev.event_type.header.size = sizeof(ev.event_type) - | 2541 | ev.event_type.header.size = sizeof(ev.event_type) - |
2542 | (sizeof(ev.event_type.event_type.name) - size); | 2542 | (sizeof(ev.event_type.event_type.name) - size); |
2543 | 2543 | ||
@@ -2606,7 +2606,7 @@ int perf_event__synthesize_tracing_data(struct perf_tool *tool, int fd, | |||
2606 | 2606 | ||
2607 | ev.tracing_data.header.type = PERF_RECORD_HEADER_TRACING_DATA; | 2607 | ev.tracing_data.header.type = PERF_RECORD_HEADER_TRACING_DATA; |
2608 | size = tdata->size; | 2608 | size = tdata->size; |
2609 | aligned_size = ALIGN(size, sizeof(u64)); | 2609 | aligned_size = PERF_ALIGN(size, sizeof(u64)); |
2610 | padding = aligned_size - size; | 2610 | padding = aligned_size - size; |
2611 | ev.tracing_data.header.size = sizeof(ev.tracing_data); | 2611 | ev.tracing_data.header.size = sizeof(ev.tracing_data); |
2612 | ev.tracing_data.size = aligned_size; | 2612 | ev.tracing_data.size = aligned_size; |
@@ -2637,7 +2637,7 @@ int perf_event__process_tracing_data(union perf_event *event, | |||
2637 | 2637 | ||
2638 | size_read = trace_report(session->fd, &session->pevent, | 2638 | size_read = trace_report(session->fd, &session->pevent, |
2639 | session->repipe); | 2639 | session->repipe); |
2640 | padding = ALIGN(size_read, sizeof(u64)) - size_read; | 2640 | padding = PERF_ALIGN(size_read, sizeof(u64)) - size_read; |
2641 | 2641 | ||
2642 | if (read(session->fd, buf, padding) < 0) | 2642 | if (read(session->fd, buf, padding) < 0) |
2643 | die("reading input file"); | 2643 | die("reading input file"); |
@@ -2671,7 +2671,7 @@ int perf_event__synthesize_build_id(struct perf_tool *tool, | |||
2671 | memset(&ev, 0, sizeof(ev)); | 2671 | memset(&ev, 0, sizeof(ev)); |
2672 | 2672 | ||
2673 | len = pos->long_name_len + 1; | 2673 | len = pos->long_name_len + 1; |
2674 | len = ALIGN(len, NAME_ALIGN); | 2674 | len = PERF_ALIGN(len, NAME_ALIGN); |
2675 | memcpy(&ev.build_id.build_id, pos->build_id, sizeof(pos->build_id)); | 2675 | memcpy(&ev.build_id.build_id, pos->build_id, sizeof(pos->build_id)); |
2676 | ev.build_id.header.type = PERF_RECORD_HEADER_BUILD_ID; | 2676 | ev.build_id.header.type = PERF_RECORD_HEADER_BUILD_ID; |
2677 | ev.build_id.header.misc = misc; | 2677 | ev.build_id.header.misc = misc; |