diff options
| author | Ingo Molnar <mingo@kernel.org> | 2015-01-30 13:26:32 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2015-01-30 13:26:32 -0500 |
| commit | 1ed39bac21c3c2934b18de34df9478ad7b8edf1f (patch) | |
| tree | 7098b1f13486d538e522191c577c632d3c6cb37e /tools/perf/builtin-inject.c | |
| parent | b3890e4704594fa23abe1395d1fafc97d3214be8 (diff) | |
| parent | c52686f9f888d23ca72f1309e86af8e91d075697 (diff) | |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
User visible changes:
- Show precise number of samples in at the end of a 'record' session, if
processing build ids, since we will then traverse the whole perf.data file
and see all the PERF_RECORD_SAMPLE records, otherwise stop showing the
previous off-base heuristicly counted number of "samples" (Namhyung Kim).
- Support to read compressed module from build-id cache (Namhyung Kim)
Infrastructure changes:
- Cache eh/debug frame offset for dwarf unwind (Namhyung Kim)
- Set header version correctly in all cases (Namhyung Kim)
- Set attr.task bit for a tracking event, to be consistent (Namhyung Kim)
perf tools: Use perf_data_file__fd() consistently
perf symbols: Convert lseek + read to pread
- Don't rely on malloc working for sz 0, fixing another problem when
using uClibc (Vineet Gupta)
- Provide stub for missing pthread_attr_setaffinity_np for libcs where this
is not available, such as uClibc (Vineet Gupta)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/builtin-inject.c')
| -rw-r--r-- | tools/perf/builtin-inject.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index 84df2deed988..a13641e066f5 100644 --- a/tools/perf/builtin-inject.c +++ b/tools/perf/builtin-inject.c | |||
| @@ -343,6 +343,7 @@ static int __cmd_inject(struct perf_inject *inject) | |||
| 343 | int ret = -EINVAL; | 343 | int ret = -EINVAL; |
| 344 | struct perf_session *session = inject->session; | 344 | struct perf_session *session = inject->session; |
| 345 | struct perf_data_file *file_out = &inject->output; | 345 | struct perf_data_file *file_out = &inject->output; |
| 346 | int fd = perf_data_file__fd(file_out); | ||
| 346 | 347 | ||
| 347 | signal(SIGINT, sig_handler); | 348 | signal(SIGINT, sig_handler); |
| 348 | 349 | ||
| @@ -376,7 +377,7 @@ static int __cmd_inject(struct perf_inject *inject) | |||
| 376 | } | 377 | } |
| 377 | 378 | ||
| 378 | if (!file_out->is_pipe) | 379 | if (!file_out->is_pipe) |
| 379 | lseek(file_out->fd, session->header.data_offset, SEEK_SET); | 380 | lseek(fd, session->header.data_offset, SEEK_SET); |
| 380 | 381 | ||
| 381 | ret = perf_session__process_events(session, &inject->tool); | 382 | ret = perf_session__process_events(session, &inject->tool); |
| 382 | 383 | ||
| @@ -385,7 +386,7 @@ static int __cmd_inject(struct perf_inject *inject) | |||
| 385 | perf_header__set_feat(&session->header, | 386 | perf_header__set_feat(&session->header, |
| 386 | HEADER_BUILD_ID); | 387 | HEADER_BUILD_ID); |
| 387 | session->header.data_size = inject->bytes_written; | 388 | session->header.data_size = inject->bytes_written; |
| 388 | perf_session__write_header(session, session->evlist, file_out->fd, true); | 389 | perf_session__write_header(session, session->evlist, fd, true); |
| 389 | } | 390 | } |
| 390 | 391 | ||
| 391 | return ret; | 392 | return ret; |
