Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1167160 > unrolled thread
| Started by | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| First post | 2015-06-17 23:30 +0200 |
| Last post | 2015-06-19 08:30 +0200 |
| Articles | 6 — 2 participants |
Back to article view | Back to linux.kernel
[GIT PULL 0/8] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-06-17 23:30 +0200
[PATCH 4/8] perf probe: Show usage even if the last event is skipped Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-06-17 23:30 +0200
Re: [GIT PULL 0/8] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2015-06-18 09:50 +0200
[RFC] hotkey for disabling/enabling events in 'perf top' TUI was Re: [GIT PULL 0/8] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-06-18 22:20 +0200
Re: [RFC] hotkey for disabling/enabling events in 'perf top' TUI was Re: [GIT PULL 0/8] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2015-06-18 23:00 +0200
Re: [RFC] hotkey for disabling/enabling events in 'perf top' TUI was Re: [GIT PULL 0/8] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2015-06-19 08:30 +0200
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2015-06-17 23:30 +0200 |
| Subject | [GIT PULL 0/8] perf/core improvements and fixes |
| Message-ID | <pCt4e-51d-5@gated-at.bofh.it> |
Hi Ingo,
Please consider pulling, this is on top of perf-core-for-mingo, that is
still outstanding,
Thanks!
- Arnaldo
The following changes since commit b031220d520238075bd99513a420e65cf37866ad:
perf probe: Fix to return error if no probe is added (2015-06-16 11:39:51 -0300)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-2
for you to fetch changes up to 5d484f99aed547e235f2229653c95392a1bc3692:
perf top: Allow disabling/enabling events dynamicly (2015-06-17 16:50:52 -0300)
----------------------------------------------------------------
perf/core improvements and fixes:
User visible:
- Allow disabling/enabling events dynamicly in 'perf top':
a 'perf top' session can instantly become a 'perf report'
one, i.e. going from dynamic analysis to a static one,
returning to a dynamic one is possible, to toogle the
modes, just press CTRL+z. (Arnaldo Carvalho de Melo)
- Greatly speed up 'perf probe --list' by caching debuginfo
(Masami Hiramatsu)
- Fix 'perf trace' race condition at the end of started
workloads (Sukadev Bhattiprolu)
- Fix a problem when opening old perf.data with different
byte order (Wang Nan)
Infrastructure:
- Ignore .config-detected in .gitignore (Wang Nan)
- Move libtraceevent dynamic list to separated LDFLAGS
variable (Wang Nan)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
perf evlist: Add toggle_enable() method
perf top: Allow disabling/enabling events dynamicly
Masami Hiramatsu (2):
perf probe: Show usage even if the last event is skipped
perf probe: Speed up perf probe --list by caching debuginfo
Sukadev Bhattiprolu (1):
perf trace: Fix race condition at the end of started workloads
Wang Nan (3):
perf tools: Ignore .config-detected in .gitignore
perf tools: Fix a problem when opening old perf.data with different byte order
perf tools: Move libtraceevent dynamic list to separated LDFLAGS variable
tools/perf/.gitignore | 1 +
tools/perf/Makefile.perf | 8 ++--
tools/perf/builtin-top.c | 52 ++++++++++++++++++--------
tools/perf/ui/browsers/hists.c | 2 +
tools/perf/util/evlist.c | 18 ++++++++-
tools/perf/util/evlist.h | 2 +
tools/perf/util/probe-event.c | 83 +++++++++++++++++++++++++++++++-----------
tools/perf/util/session.c | 50 ++++++++++++++++++-------
8 files changed, 160 insertions(+), 56 deletions(-)
--
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 | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2015-06-17 23:30 +0200 |
| Subject | [PATCH 4/8] perf probe: Show usage even if the last event is skipped |
| Message-ID | <pCt4g-51d-45@gated-at.bofh.it> |
| In reply to | #1167160 |
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
When the last part of converted events are blacklisted or out-of-text,
those are skipped and perf probe doesn't show usage examples. This
fixes it to show the example even if the last part of event list is
skipped.
E.g. without this patch, events are added, but suddenly end:
# perf probe vfs_*
vfs_caches_init_early is out of .text, skip it.
vfs_caches_init is out of .text, skip it.
Added new events:
probe:vfs_fallocate (on vfs_*)
probe:vfs_open (on vfs_*)
...
probe:vfs_dentry_acceptable (on vfs_*)
probe:vfs_load_quota_inode (on vfs_*)
#
With this fix:
# perf probe vfs_*
vfs_caches_init_early is out of .text, skip it.
vfs_caches_init is out of .text, skip it.
Added new events:
probe:vfs_fallocate (on vfs_*)
...
probe:vfs_load_quota_inode (on vfs_*)
You can now use it in all perf tools, such as:
perf record -e probe:vfs_load_quota_inode -aR sleep 1
Note that this can be reproduced ONLY IF the vfs_caches_init* is the
last part of matched symbol list. I've checked this happens on
"3.19.0-generic #18-Ubuntu" kernel binary.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Naohiro Aota <naota@elisp.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20150616115057.19906.5502.stgit@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/probe-event.c | 35 +++++++++++++++++------------------
1 file changed, 17 insertions(+), 18 deletions(-)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 85c8207c25cc..65a1c8252270 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -2157,7 +2157,8 @@ static bool kprobe_blacklist__listed(unsigned long address)
return !!kprobe_blacklist__find_by_address(&kprobe_blacklist, address);
}
-static int perf_probe_event__sprintf(struct perf_probe_event *pev,
+static int perf_probe_event__sprintf(const char *group, const char *event,
+ struct perf_probe_event *pev,
const char *module,
struct strbuf *result)
{
@@ -2170,7 +2171,7 @@ static int perf_probe_event__sprintf(struct perf_probe_event *pev,
if (!place)
return -EINVAL;
- ret = e_snprintf(buf, 128, "%s:%s", pev->group, pev->event);
+ ret = e_snprintf(buf, 128, "%s:%s", group, event);
if (ret < 0)
goto out;
@@ -2195,13 +2196,14 @@ out:
}
/* Show an event */
-static int show_perf_probe_event(struct perf_probe_event *pev,
+static int show_perf_probe_event(const char *group, const char *event,
+ struct perf_probe_event *pev,
const char *module, bool use_stdout)
{
struct strbuf buf = STRBUF_INIT;
int ret;
- ret = perf_probe_event__sprintf(pev, module, &buf);
+ ret = perf_probe_event__sprintf(group, event, pev, module, &buf);
if (ret >= 0) {
if (use_stdout)
printf("%s\n", buf.buf);
@@ -2253,7 +2255,8 @@ static int __show_perf_probe_events(int fd, bool is_kprobe,
is_kprobe);
if (ret < 0)
goto next;
- ret = show_perf_probe_event(&pev, tev.point.module,
+ ret = show_perf_probe_event(pev.group, pev.event,
+ &pev, tev.point.module,
true);
}
next:
@@ -2438,7 +2441,7 @@ static int __add_probe_trace_events(struct perf_probe_event *pev,
int i, fd, ret;
struct probe_trace_event *tev = NULL;
char buf[64];
- const char *event, *group;
+ const char *event = NULL, *group = NULL;
struct strlist *namelist;
bool safename;
@@ -2500,15 +2503,12 @@ static int __add_probe_trace_events(struct perf_probe_event *pev,
/* Add added event name to namelist */
strlist__add(namelist, event);
- /* Trick here - save current event/group */
- event = pev->event;
- group = pev->group;
- pev->event = tev->event;
- pev->group = tev->group;
- show_perf_probe_event(pev, tev->point.module, false);
- /* Trick here - restore current event/group */
- pev->event = (char *)event;
- pev->group = (char *)group;
+ /* We use tev's name for showing new events */
+ show_perf_probe_event(tev->group, tev->event, pev,
+ tev->point.module, false);
+ /* Save the last valid name */
+ event = tev->event;
+ group = tev->group;
/*
* Probes after the first probe which comes from same
@@ -2522,11 +2522,10 @@ static int __add_probe_trace_events(struct perf_probe_event *pev,
warn_uprobe_event_compat(tev);
/* Note that it is possible to skip all events because of blacklist */
- if (ret >= 0 && tev->event) {
+ if (ret >= 0 && event) {
/* Show how to use the event. */
pr_info("\nYou can now use it in all perf tools, such as:\n\n");
- pr_info("\tperf record -e %s:%s -aR sleep 1\n\n", tev->group,
- tev->event);
+ pr_info("\tperf record -e %s:%s -aR sleep 1\n\n", group, event);
}
strlist__delete(namelist);
--
2.1.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] | [prev] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2015-06-18 09:50 +0200 |
| Message-ID | <pCCKd-1XC-5@gated-at.bofh.it> |
| In reply to | #1167160 |
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > Hi Ingo, > > Please consider pulling, this is on top of perf-core-for-mingo, that is > still outstanding, > > Thanks! > > - Arnaldo > > The following changes since commit b031220d520238075bd99513a420e65cf37866ad: > > perf probe: Fix to return error if no probe is added (2015-06-16 11:39:51 -0300) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-2 > > for you to fetch changes up to 5d484f99aed547e235f2229653c95392a1bc3692: > > perf top: Allow disabling/enabling events dynamicly (2015-06-17 16:50:52 -0300) > > ---------------------------------------------------------------- > perf/core improvements and fixes: > > User visible: > > - Allow disabling/enabling events dynamicly in 'perf top': > a 'perf top' session can instantly become a 'perf report' > one, i.e. going from dynamic analysis to a static one, > returning to a dynamic one is possible, to toogle the > modes, just press CTRL+z. (Arnaldo Carvalho de Melo) Nice!! :-) Btw., it would be nice if the status line carried information about whether collection is 'frozen' or running, at a glance. A hint might also suggest how to unfreeze the session - in case someone pressed Ctrl-Z to suspend the perf top session ... Also, there's now a GUI inconsistency with perf report: which will now exit on Ctrl-Z. It should probably print a warning in the status line instead, that freezing/unfreezing only works in 'perf top'. > > - Greatly speed up 'perf probe --list' by caching debuginfo > (Masami Hiramatsu) > > - Fix 'perf trace' race condition at the end of started > workloads (Sukadev Bhattiprolu) > > - Fix a problem when opening old perf.data with different > byte order (Wang Nan) > > Infrastructure: > > - Ignore .config-detected in .gitignore (Wang Nan) > > - Move libtraceevent dynamic list to separated LDFLAGS > variable (Wang Nan) > > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> > > ---------------------------------------------------------------- > Arnaldo Carvalho de Melo (2): > perf evlist: Add toggle_enable() method > perf top: Allow disabling/enabling events dynamicly > > Masami Hiramatsu (2): > perf probe: Show usage even if the last event is skipped > perf probe: Speed up perf probe --list by caching debuginfo > > Sukadev Bhattiprolu (1): > perf trace: Fix race condition at the end of started workloads > > Wang Nan (3): > perf tools: Ignore .config-detected in .gitignore > perf tools: Fix a problem when opening old perf.data with different byte order > perf tools: Move libtraceevent dynamic list to separated LDFLAGS variable > > tools/perf/.gitignore | 1 + > tools/perf/Makefile.perf | 8 ++-- > tools/perf/builtin-top.c | 52 ++++++++++++++++++-------- > tools/perf/ui/browsers/hists.c | 2 + > tools/perf/util/evlist.c | 18 ++++++++- > tools/perf/util/evlist.h | 2 + > tools/perf/util/probe-event.c | 83 +++++++++++++++++++++++++++++++----------- > tools/perf/util/session.c | 50 ++++++++++++++++++------- > 8 files changed, 160 insertions(+), 56 deletions(-) Pulled, thanks a lot Arnaldo! Ingo -- 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] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2015-06-18 22:20 +0200 |
| Subject | [RFC] hotkey for disabling/enabling events in 'perf top' TUI was Re: [GIT PULL 0/8] perf/core improvements and fixes |
| Message-ID | <pCOs1-2aq-9@gated-at.bofh.it> |
| In reply to | #1167637 |
Em Thu, Jun 18, 2015 at 09:40:10AM +0200, Ingo Molnar escreveu: > * Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > > User visible: > > - Allow disabling/enabling events dynamicly in 'perf top': > > a 'perf top' session can instantly become a 'perf report' > > one, i.e. going from dynamic analysis to a static one, > > returning to a dynamic one is possible, to toogle the > > modes, just press CTRL+z. (Arnaldo Carvalho de Melo) > Nice!! :-) > Btw., it would be nice if the status line carried information about whether > collection is 'frozen' or running, at a glance. A hint might also suggest how to > unfreeze the session - in case someone pressed Ctrl-Z to suspend the perf top > session ... Right, and I think we better find other hotkey and make Ctrl+Z work like with other tools, i.e. suspend: [acme@zoo linux]$ mutt [1]+ Stopped mutt [acme@zoo linux]$ vim [2]+ Stopped vim [acme@zoo linux]$ The perf TUI should work like that as well... Ideas? We already have: h/?/F1 Show this window UP/DOWN/PGUP PGDN/SPACE Navigate q/ESC/CTRL+C Exit browser For multiple event sessions: TAB/UNTAB Switch events For symbolic views (--sort has sym): -> Zoom into DSO/Threads & Annotate current symbol <- Zoom out a Annotate current symbol C Collapse all callchains d Zoom into current DSO D Show some developer debug info E Expand all callchains F Toggle percentage of filtered entries H Display column headers i Show header information P Print histograms to perf.hist.N r Run available scripts s Switch to another data file in PWD t Zoom into current Thread V Verbose (DSO names in callchains, etc) z Toggle zeroing of samples / Filter symbol by name > Also, there's now a GUI inconsistency with perf report: which will now exit on > Ctrl-Z. It should probably print a warning in the status line instead, that > freezing/unfreezing only works in 'perf top'. I'll fix that. - Arnaldo -- 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] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2015-06-18 23:00 +0200 |
| Subject | Re: [RFC] hotkey for disabling/enabling events in 'perf top' TUI was Re: [GIT PULL 0/8] perf/core improvements and fixes |
| Message-ID | <pCP4K-2Tq-13@gated-at.bofh.it> |
| In reply to | #1168270 |
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > Em Thu, Jun 18, 2015 at 09:40:10AM +0200, Ingo Molnar escreveu: > > * Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > > > User visible: > > > > - Allow disabling/enabling events dynamicly in 'perf top': > > > a 'perf top' session can instantly become a 'perf report' > > > one, i.e. going from dynamic analysis to a static one, > > > returning to a dynamic one is possible, to toogle the > > > modes, just press CTRL+z. (Arnaldo Carvalho de Melo) > > > Nice!! :-) > > > Btw., it would be nice if the status line carried information about whether > > collection is 'frozen' or running, at a glance. A hint might also suggest how to > > unfreeze the session - in case someone pressed Ctrl-Z to suspend the perf top > > session ... > > Right, and I think we better find other hotkey and make Ctrl+Z work like > with other tools, i.e. suspend: > > [acme@zoo linux]$ mutt > > [1]+ Stopped mutt > [acme@zoo linux]$ vim > > [2]+ Stopped vim > [acme@zoo linux]$ > > The perf TUI should work like that as well... > > Ideas? > > We already have: > > h/?/F1 Show this window > UP/DOWN/PGUP > PGDN/SPACE Navigate > q/ESC/CTRL+C Exit browser > > For multiple event sessions: > > TAB/UNTAB Switch events > > For symbolic views (--sort has sym): > > -> Zoom into DSO/Threads & Annotate current symbol > <- Zoom out > a Annotate current symbol > C Collapse all callchains > d Zoom into current DSO > D Show some developer debug info > E Expand all callchains > F Toggle percentage of filtered entries > H Display column headers > i Show header information > P Print histograms to perf.hist.N > r Run available scripts > s Switch to another data file in PWD > t Zoom into current Thread > V Verbose (DSO names in callchains, etc) > z Toggle zeroing of samples > / Filter symbol by name Is 'f' (for 'freeze') still available? Thanks, Ingo -- 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] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2015-06-19 08:30 +0200 |
| Subject | Re: [RFC] hotkey for disabling/enabling events in 'perf top' TUI was Re: [GIT PULL 0/8] perf/core improvements and fixes |
| Message-ID | <pCXYl-7Dj-9@gated-at.bofh.it> |
| In reply to | #1168289 |
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > Em Thu, Jun 18, 2015 at 10:58:13PM +0200, Ingo Molnar escreveu: > > * Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > > > > Btw., it would be nice if the status line carried information about whether > > > > collection is 'frozen' or running, at a glance. A hint might also suggest how to > > > > unfreeze the session - in case someone pressed Ctrl-Z to suspend the perf top > > > > session ... > > > > > > Right, and I think we better find other hotkey and make Ctrl+Z work like > > > with other tools, i.e. suspend: > > > > > > [acme@zoo linux]$ mutt > > > > > > [1]+ Stopped mutt > > > [acme@zoo linux]$ vim > > > > > > [2]+ Stopped vim > > > [acme@zoo linux]$ > > > > > > The perf TUI should work like that as well... > > > > > > Ideas? > > > > > > We already have: > > > > > > h/?/F1 Show this window > > > UP/DOWN/PGUP > <SNIP> > > > z Toggle zeroing of samples > > > / Filter symbol by name > > > > Is 'f' (for 'freeze') still available? > > It is available in both the 'report'/'top' (aka the "hists" browser) and in the > annotate browser, so I'll go with it, and leave CTRL+z alone, then make it it > suspend. Sounds good to me! Thanks, Ingo -- 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