Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1235706 > unrolled thread
| Started by | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| First post | 2015-09-30 04:00 +0200 |
| Last post | 2015-10-03 09:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/3] perf top: Fix unresolved comm when -s comm is used Namhyung Kim <namhyung@kernel.org> - 2015-09-30 04:00 +0200
[tip:perf/core] perf top: Fix unresolved comm when -s comm is used tip-bot for Namhyung Kim <tipbot@zytor.com> - 2015-10-03 09:50 +0200
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2015-09-30 04:00 +0200 |
| Subject | [PATCH 2/3] perf top: Fix unresolved comm when -s comm is used |
| Message-ID | <qeeQx-7rT-1@gated-at.bofh.it> |
The perf top uses 'dso,symbol' sort keys by default so it overlooked a problem in task's comm resolving. When the sort key contains 'comm', some task's comm is not shown properly. This is because the perf_top__mmap_read_idx() checks the cpumode value improperly. The cpumode value of non-sample events are 0 (PERF_RECORD_MISC_CPUMODE_ UNKNOWN) so the events will be ignored by the switch statement. This patch allows it for non-sample events. Signed-off-by: Namhyung Kim <namhyung@kernel.org> --- tools/perf/builtin-top.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 38d4d6cac823..ae4c6420300b 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -857,9 +857,12 @@ static void perf_top__mmap_read_idx(struct perf_top *top, int idx) * TODO: we don't process guest user from host side * except simple counting. */ - /* Fall thru */ - default: goto next_event; + default: + if (event->header.type == PERF_RECORD_SAMPLE) + goto next_event; + machine = &session->machines.host; + break; } -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | tip-bot for Namhyung Kim <tipbot@zytor.com> |
|---|---|
| Date | 2015-10-03 09:50 +0200 |
| Subject | [tip:perf/core] perf top: Fix unresolved comm when -s comm is used |
| Message-ID | <qfpJU-3Pm-9@gated-at.bofh.it> |
| In reply to | #1235706 |
Commit-ID: 4b37af595742977f1bdd8c0fd0f3e6e55b36e7b7 Gitweb: http://git.kernel.org/tip/4b37af595742977f1bdd8c0fd0f3e6e55b36e7b7 Author: Namhyung Kim <namhyung@kernel.org> AuthorDate: Wed, 30 Sep 2015 10:45:25 +0900 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Thu, 1 Oct 2015 09:54:33 -0300 perf top: Fix unresolved comm when -s comm is used The perf top uses 'dso,symbol' sort keys by default so it overlooked a problem in task's comm resolving. When the sort key contains 'comm', some task's comm is not shown properly. This is because the perf_top__mmap_read_idx() checks the cpumode value improperly. The cpumode value of non-sample events are 0 (PERF_RECORD_MISC_CPUMODE_ UNKNOWN) so the events will be ignored by the switch statement. This patch allows it for non-sample events. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1443577526-3240-2-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/builtin-top.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 38d4d6c..ae4c642 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -857,9 +857,12 @@ static void perf_top__mmap_read_idx(struct perf_top *top, int idx) * TODO: we don't process guest user from host side * except simple counting. */ - /* Fall thru */ - default: goto next_event; + default: + if (event->header.type == PERF_RECORD_SAMPLE) + goto next_event; + machine = &session->machines.host; + break; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web