diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-09-06 08:08:08 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-09-06 08:08:08 -0400 |
commit | 72f4a11d2fb16792f5e5107922652366194cfd66 (patch) | |
tree | 44429da06dafd36090000092e02be2e9cc0b4f44 /tools/perf/util | |
parent | 816434ec4a674fcdb3c2221a6dffdc8f34020550 (diff) | |
parent | 526fd8d4f770d18e99680ff87965e16bb8f1d806 (diff) |
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
* Fix parsing with no sample_id_all bit set, this regression prevents perf
from reading old perf.data files generated in systems where
perf_event_attr.sample_id_all isn't available, from Adrian Hunter.
* Add signal checking to the inner 'perf trace' event processing loop, allowing
faster response to control+C.
* Fix formatting of long symbol names removing the hardcoding of a buffer
size used to format histogram entries, which was truncating the lines.
* Separate progress bar update when processing events, reducing potentially big
overhead in not needed TUI progress bar screen updates, from Jiri Olsa.
* Fix 'perf trace' build in architectures where MAP_32BIT is not defined, from
Kyle McMartin.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/evlist.c | 9 | ||||
-rw-r--r-- | tools/perf/util/session.c | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index b8727ae45e3b..7101283ac3c5 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c | |||
@@ -446,20 +446,25 @@ static int perf_evlist__event2id(struct perf_evlist *evlist, | |||
446 | static struct perf_evsel *perf_evlist__event2evsel(struct perf_evlist *evlist, | 446 | static struct perf_evsel *perf_evlist__event2evsel(struct perf_evlist *evlist, |
447 | union perf_event *event) | 447 | union perf_event *event) |
448 | { | 448 | { |
449 | struct perf_evsel *first = perf_evlist__first(evlist); | ||
449 | struct hlist_head *head; | 450 | struct hlist_head *head; |
450 | struct perf_sample_id *sid; | 451 | struct perf_sample_id *sid; |
451 | int hash; | 452 | int hash; |
452 | u64 id; | 453 | u64 id; |
453 | 454 | ||
454 | if (evlist->nr_entries == 1) | 455 | if (evlist->nr_entries == 1) |
455 | return perf_evlist__first(evlist); | 456 | return first; |
457 | |||
458 | if (!first->attr.sample_id_all && | ||
459 | event->header.type != PERF_RECORD_SAMPLE) | ||
460 | return first; | ||
456 | 461 | ||
457 | if (perf_evlist__event2id(evlist, event, &id)) | 462 | if (perf_evlist__event2id(evlist, event, &id)) |
458 | return NULL; | 463 | return NULL; |
459 | 464 | ||
460 | /* Synthesized events have an id of zero */ | 465 | /* Synthesized events have an id of zero */ |
461 | if (!id) | 466 | if (!id) |
462 | return perf_evlist__first(evlist); | 467 | return first; |
463 | 468 | ||
464 | hash = hash_64(id, PERF_EVLIST__HLIST_BITS); | 469 | hash = hash_64(id, PERF_EVLIST__HLIST_BITS); |
465 | head = &evlist->heads[hash]; | 470 | head = &evlist->heads[hash]; |
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 1fc0c628683e..476caa129a20 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -504,6 +504,7 @@ static int flush_sample_queue(struct perf_session *s, | |||
504 | u64 limit = os->next_flush; | 504 | u64 limit = os->next_flush; |
505 | u64 last_ts = os->last_sample ? os->last_sample->timestamp : 0ULL; | 505 | u64 last_ts = os->last_sample ? os->last_sample->timestamp : 0ULL; |
506 | unsigned idx = 0, progress_next = os->nr_samples / 16; | 506 | unsigned idx = 0, progress_next = os->nr_samples / 16; |
507 | bool show_progress = limit == ULLONG_MAX; | ||
507 | int ret; | 508 | int ret; |
508 | 509 | ||
509 | if (!tool->ordered_samples || !limit) | 510 | if (!tool->ordered_samples || !limit) |
@@ -526,7 +527,7 @@ static int flush_sample_queue(struct perf_session *s, | |||
526 | os->last_flush = iter->timestamp; | 527 | os->last_flush = iter->timestamp; |
527 | list_del(&iter->list); | 528 | list_del(&iter->list); |
528 | list_add(&iter->list, &os->sample_cache); | 529 | list_add(&iter->list, &os->sample_cache); |
529 | if (++idx >= progress_next) { | 530 | if (show_progress && (++idx >= progress_next)) { |
530 | progress_next += os->nr_samples / 16; | 531 | progress_next += os->nr_samples / 16; |
531 | ui_progress__update(idx, os->nr_samples, | 532 | ui_progress__update(idx, os->nr_samples, |
532 | "Processing time ordered events..."); | 533 | "Processing time ordered events..."); |