Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1301281 > unrolled thread

[RFC/PATCH] perf report: Show random usage tip on the help line

Started byNamhyung Kim <namhyung@kernel.org>
First post2016-01-05 06:40 +0100
Last post2016-01-08 16:50 +0100
Articles 13 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [RFC/PATCH] perf report: Show random usage tip on the help line Namhyung Kim <namhyung@kernel.org> - 2016-01-05 06:40 +0100
    Re: [RFC/PATCH] perf report: Show random usage tip on the help line "Wangnan (F)" <wangnan0@huawei.com> - 2016-01-05 07:40 +0100
      Re: [RFC/PATCH] perf report: Show random usage tip on the help line Namhyung Kim <namhyung@kernel.org> - 2016-01-05 11:50 +0100
        Re: [RFC/PATCH] perf report: Show random usage tip on the help line Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-05 17:50 +0100
          Re: [RFC/PATCH] perf report: Show random usage tip on the help line Namhyung Kim <namhyung@kernel.org> - 2016-01-05 20:30 +0100
            Re: [RFC/PATCH] perf report: Show random usage tip on the help line Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-05 22:00 +0100
              Re: [RFC/PATCH] perf report: Show random usage tip on the help line Andi Kleen <andi@firstfloor.org> - 2016-01-05 22:00 +0100
                Re: [RFC/PATCH] perf report: Show random usage tip on the help line Namhyung Kim <namhyung@kernel.org> - 2016-01-06 00:30 +0100
                  Re: [RFC/PATCH] perf report: Show random usage tip on the help line Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-06 02:50 +0100
        Re: [RFC/PATCH] perf report: Show random usage tip on the help line Andi Kleen <andi@firstfloor.org> - 2016-01-05 22:00 +0100
          Re: [RFC/PATCH] perf report: Show random usage tip on the help line Namhyung Kim <namhyung@kernel.org> - 2016-01-06 00:40 +0100
            Re: [RFC/PATCH] perf report: Show random usage tip on the help line Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-06 03:00 +0100
            Re: [RFC/PATCH] perf report: Show random usage tip on the help line Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-08 16:50 +0100

#1301281 — [RFC/PATCH] perf report: Show random usage tip on the help line

FromNamhyung Kim <namhyung@kernel.org>
Date2016-01-05 06:40 +0100
Subject[RFC/PATCH] perf report: Show random usage tip on the help line
Message-ID<qNsvE-5OP-5@gated-at.bofh.it>
Currently perf report only shows a help message "For a higher level
overview, try: perf report --sort comm,dso" unconditionally (even if
the sort keys were used).  Add more help tips and show randomly.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/builtin-report.c |  2 +-
 tools/perf/perf.c           |  4 ++++
 tools/perf/util/util.c      | 22 ++++++++++++++++++++++
 tools/perf/util/util.h      |  2 ++
 4 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index f10c663af996..c9cc15431a0f 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -433,7 +433,7 @@ static int report__browse_hists(struct report *rep)
 	int ret;
 	struct perf_session *session = rep->session;
 	struct perf_evlist *evlist = session->evlist;
-	const char *help = "For a higher level overview, try: perf report --sort comm,dso";
+	const char *help = perf_report_tip();
 
 	switch (use_browser) {
 	case 1:
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index cb1d2499c45c..a929618b8eb6 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -19,6 +19,8 @@
 #include "util/debug.h"
 #include <api/fs/tracing_path.h>
 #include <pthread.h>
+#include <stdlib.h>
+#include <time.h>
 
 const char perf_usage_string[] =
 	"perf [--version] [--help] [OPTIONS] COMMAND [ARGS]";
@@ -542,6 +544,8 @@ int main(int argc, const char **argv)
 	if (!cmd)
 		cmd = "perf-help";
 
+	srandom(time(NULL));
+
 	/* get debugfs/tracefs mount point from /proc/mounts */
 	tracing_path_mount();
 
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index aff0cfd83662..09c6d6cb932b 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -663,3 +663,25 @@ fetch_kernel_version(unsigned int *puint, char *str,
 		*puint = (version << 16) + (patchlevel << 8) + sublevel;
 	return 0;
 }
+
+const char *perf_report_tip(void)
+{
+	const char *tips[] = {
+		"For a higher level overview, try: perf report --sort comm,dso",
+		"Group related events with: perf record -e '{cycles,instructions}'",
+		"Compare performance with: perf diff [<old file> <new file>]",
+		"Boolean options have negative forms like: perf report --no-children",
+		"Customize output of perf script with: perf script -F event,ip,sym",
+		"Generate a script for your data: perf script -g <lang>",
+		"Save output of perf stat using: perf stat record",
+		"Create archive of data to see it on other machine: perf archive",
+		"Search options using a keyword: perf report -h filter",
+		"Use parent filter to see specific call path: perf report -p <regex>",
+		"listing interested events using substring match: perf list cpu",
+		"To see list of saved events and attributes: perf evlist -v",
+		"Use --symfs <dir> if your symbol files are in non-standard location",
+		"To see callchains in a more compact form: perf report -g folded",
+	};
+
+	return tips[random() % ARRAY_SIZE(tips)];
+}
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 4b519c59bdc3..8e9cec4bf376 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -342,4 +342,6 @@ int fetch_kernel_version(unsigned int *puint,
 #define KVER_FMT	"%d.%d.%d"
 #define KVER_PARAM(x)	KVER_VERSION(x), KVER_PATCHLEVEL(x), KVER_SUBLEVEL(x)
 
+const char *perf_report_tip(void);
+
 #endif /* GIT_COMPAT_UTIL_H */
-- 
2.6.4

--
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]


#1301290

From"Wangnan (F)" <wangnan0@huawei.com>
Date2016-01-05 07:40 +0100
Message-ID<qNtrI-6yZ-7@gated-at.bofh.it>
In reply to#1301281

On 2016/1/5 13:36, Namhyung Kim wrote:
> Currently perf report only shows a help message "For a higher level
> overview, try: perf report --sort comm,dso" unconditionally (even if
> the sort keys were used).  Add more help tips and show randomly.
>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---

That's really funny.

Some inconvenience:

  1. Tip is never change during one execution of 'perf report', even if
     I switch to another view using 'enter' and switch back. It should 
better
     if tips updated when redrawing.

  2. I think add a "Tip: " prefix to the content should be better, or 
users may
     confuse what he/her doing causes this message

  3. What about creating a tools/perf/Documentation/tips.txt and 
generate tips
     table dynamically?

Thank you.


--
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]


#1301416

FromNamhyung Kim <namhyung@kernel.org>
Date2016-01-05 11:50 +0100
Message-ID<qNxlD-Sz-5@gated-at.bofh.it>
In reply to#1301290
Hi,

On Tue, Jan 05, 2016 at 02:32:47PM +0800, Wangnan (F) wrote:
> 
> 
> On 2016/1/5 13:36, Namhyung Kim wrote:
> >Currently perf report only shows a help message "For a higher level
> >overview, try: perf report --sort comm,dso" unconditionally (even if
> >the sort keys were used).  Add more help tips and show randomly.
> >
> >Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> >---
> 
> That's really funny.

Thanks for your feedback!

> 
> Some inconvenience:
> 
>  1. Tip is never change during one execution of 'perf report', even if
>     I switch to another view using 'enter' and switch back. It should better
>     if tips updated when redrawing.

Hmm.. I think it's a preference.  I'd go for simplicity then. :)


> 
>  2. I think add a "Tip: " prefix to the content should be better, or users
> may confuse what he/her doing causes this message

OK.

> 
>  3. What about creating a tools/perf/Documentation/tips.txt and generate
> tips table dynamically?

I don't see much difference doing that.  I guess most of users don't
want to go to see the documentation anyway.  Do I miss something?

Btw, does anyone have some tips to add? :)

Thanks,
Namhyung
--
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]


#1301701

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2016-01-05 17:50 +0100
Message-ID<qNCY3-5qN-33@gated-at.bofh.it>
In reply to#1301416
Em Tue, Jan 05, 2016 at 07:43:07PM +0900, Namhyung Kim escreveu:
> Hi,
> 
> On Tue, Jan 05, 2016 at 02:32:47PM +0800, Wangnan (F) wrote:
> > 
> > 
> > On 2016/1/5 13:36, Namhyung Kim wrote:
> > >Currently perf report only shows a help message "For a higher level
> > >overview, try: perf report --sort comm,dso" unconditionally (even if
> > >the sort keys were used).  Add more help tips and show randomly.
> > >
> > >Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > >---
> > 
> > That's really funny.
> 
> Thanks for your feedback!

:-)
 
> > 
> > Some inconvenience:
> > 
> >  1. Tip is never change during one execution of 'perf report', even if
> >     I switch to another view using 'enter' and switch back. It should better
> >     if tips updated when redrawing.
> 
> Hmm.. I think it's a preference.  I'd go for simplicity then. :)

Yeah, that can be easily done on top, after we get some more tips in.
 
> >  2. I think add a "Tip: " prefix to the content should be better, or users
> > may confuse what he/her doing causes this message
> 
> OK.
> 
> > 
> >  3. What about creating a tools/perf/Documentation/tips.txt and generate
> > tips table dynamically?
> 
> I don't see much difference doing that.  I guess most of users don't
> want to go to see the documentation anyway.  Do I miss something?

Yes, I think what he suggests is to use:

  	tips = strlist__new("file://tools/perf/Documentation/tips.txt", NULL);

And then use:

	tip = strlist__entry(tips, random() % strlist__nr_entries(tips));


Or even do as 'perf trace' does, and have a directory with one file per
tip, see 005438a8eef0 ("perf trace: Support 'strace' syscall event
groups")
 
> Btw, does anyone have some tips to add? :)

Lets get the mechanism right and then proof read the tips you provided
:-)

- 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]


#1301910

FromNamhyung Kim <namhyung@kernel.org>
Date2016-01-05 20:30 +0100
Message-ID<qNFsS-7fR-9@gated-at.bofh.it>
In reply to#1301701
Hi Arnaldo,

On Tue, Jan 05, 2016 at 01:40:10PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Jan 05, 2016 at 07:43:07PM +0900, Namhyung Kim escreveu:
> > Hi,
> > 
> > On Tue, Jan 05, 2016 at 02:32:47PM +0800, Wangnan (F) wrote:
> > > 
> > > 
> > > On 2016/1/5 13:36, Namhyung Kim wrote:
> > > >Currently perf report only shows a help message "For a higher level
> > > >overview, try: perf report --sort comm,dso" unconditionally (even if
> > > >the sort keys were used).  Add more help tips and show randomly.
> > > >
> > > >Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > > >---
> > > 
> > > That's really funny.
> > 
> > Thanks for your feedback!
> 
> :-)
>  
> > > 
> > > Some inconvenience:
> > > 
> > >  1. Tip is never change during one execution of 'perf report', even if
> > >     I switch to another view using 'enter' and switch back. It should better
> > >     if tips updated when redrawing.
> > 
> > Hmm.. I think it's a preference.  I'd go for simplicity then. :)
> 
> Yeah, that can be easily done on top, after we get some more tips in.

Right.

>  
> > >  2. I think add a "Tip: " prefix to the content should be better, or users
> > > may confuse what he/her doing causes this message
> > 
> > OK.
> > 
> > > 
> > >  3. What about creating a tools/perf/Documentation/tips.txt and generate
> > > tips table dynamically?
> > 
> > I don't see much difference doing that.  I guess most of users don't
> > want to go to see the documentation anyway.  Do I miss something?
> 
> Yes, I think what he suggests is to use:
> 
>   	tips = strlist__new("file://tools/perf/Documentation/tips.txt", NULL);
> 
> And then use:
> 
> 	tip = strlist__entry(tips, random() % strlist__nr_entries(tips));
> 
> 
> Or even do as 'perf trace' does, and have a directory with one file per
> tip, see 005438a8eef0 ("perf trace: Support 'strace' syscall event
> groups")

Thanks for the info.  It's really easy doing that, nice..

I understand what he suggesting, but not why. :)


>  
> > Btw, does anyone have some tips to add? :)
> 
> Lets get the mechanism right and then proof read the tips you provided
> :-)

OK

Thanks,
Namhyung
--
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]


#1302154

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2016-01-05 22:00 +0100
Message-ID<qNGRY-860-3@gated-at.bofh.it>
In reply to#1301910
Em Wed, Jan 06, 2016 at 04:19:25AM +0900, Namhyung Kim escreveu:
> Hi Arnaldo,
> 
> On Tue, Jan 05, 2016 at 01:40:10PM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Tue, Jan 05, 2016 at 07:43:07PM +0900, Namhyung Kim escreveu:
> > > On Tue, Jan 05, 2016 at 02:32:47PM +0800, Wangnan (F) wrote:
> > > >  3. What about creating a tools/perf/Documentation/tips.txt and generate
> > > > tips table dynamically?

> > > I don't see much difference doing that.  I guess most of users don't
> > > want to go to see the documentation anyway.  Do I miss something?

> > Yes, I think what he suggests is to use:
> >   	tips = strlist__new("file://tools/perf/Documentation/tips.txt", NULL);
> > 	tip = strlist__entry(tips, random() % strlist__nr_entries(tips));

> > Or even do as 'perf trace' does, and have a directory with one file per
> > tip, see 005438a8eef0 ("perf trace: Support 'strace' syscall event
> > groups")
 
> Thanks for the info.  It's really easy doing that, nice..
 
> I understand what he suggesting, but not why. :)

Because then adding new tips will not require rebuilding the tool?

I thought you didn't understood his point, judging by your "I guess most
of users don't want to go to see the documentation anyway" statement,
which I thought meant you thought that users would have to look at some
man-page or documentation directory to go find some particular file with
the tips...

- 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]


#1302176

FromAndi Kleen <andi@firstfloor.org>
Date2016-01-05 22:00 +0100
Message-ID<qNGS0-860-57@gated-at.bofh.it>
In reply to#1302154
> > Thanks for the info.  It's really easy doing that, nice..
>  
> > I understand what he suggesting, but not why. :)
> 
> Because then adding new tips will not require rebuilding the tool?

It would still need rebuilding if it was compiled in at build time.

The main advantage of having the source in in Documentation is that it's easy
for users to read them all together (which may be useful)

-Andi
--
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]


#1302266

FromNamhyung Kim <namhyung@kernel.org>
Date2016-01-06 00:30 +0100
Message-ID<qNJd8-1kd-15@gated-at.bofh.it>
In reply to#1302176
Hi Andi,

On Tue, Jan 05, 2016 at 09:59:11PM +0100, Andi Kleen wrote:
> > > Thanks for the info.  It's really easy doing that, nice..
> >  
> > > I understand what he suggesting, but not why. :)
> > 
> > Because then adding new tips will not require rebuilding the tool?
> 
> It would still need rebuilding if it was compiled in at build time.

Right.  Even if we allow to rebuild the tips at runtime, I doubt users
want to update their documents..

> 
> The main advantage of having the source in in Documentation is that it's easy
> for users to read them all together (which may be useful)

Agreed.

Thanks,
Namhyung
--
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]


#1302323

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2016-01-06 02:50 +0100
Message-ID<qNLoB-2IC-5@gated-at.bofh.it>
In reply to#1302266
Em Wed, Jan 06, 2016 at 08:29:37AM +0900, Namhyung Kim escreveu:
> On Tue, Jan 05, 2016 at 09:59:11PM +0100, Andi Kleen wrote:
> > > > Thanks for the info.  It's really easy doing that, nice..
> > > > I understand what he suggesting, but not why. :)

> > > Because then adding new tips will not require rebuilding the tool?

> > It would still need rebuilding if it was compiled in at build time.
 
> Right.  Even if we allow to rebuild the tips at runtime, I doubt users
> want to update their documents..

Users don't have to update their documents if they don't, but having the
tips in a separate files allows them to do that if they want, or any
other method to update that tips file.
 
> > The main advantage of having the source in in Documentation is that it's easy
> > for users to read them all together (which may be useful)
 
> Agreed.

I agree that having the tips in a separate file, in the Documentation
directory is easy for users to read them all together, that is another
advantage, yes.

- 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]


#1302167

FromAndi Kleen <andi@firstfloor.org>
Date2016-01-05 22:00 +0100
Message-ID<qNGRZ-860-43@gated-at.bofh.it>
In reply to#1301416
> Btw, does anyone have some tips to add? :)

Use perf script to show individual samples
Use perf report --percent-limit 5 to only show entires above 5%
Use perf record -b -g / perf report --branch-history to show branch events
Use perf record -b / perf report to show branch mispredictions
Use perf report -M intel to show Intel style assembler 
Use perf report --sort srcfile to sort by source file
Use perf report --sort symbol,srcline to sort by source line
Use perf record -e '{cycles,cache-misses}:S' / perf report --group to associate events
Use perf mem record / perf mem report for memory address profiling
Use perf stat -I 1000 to count events in intervals
Use perf stat -I 1000 -x, to count events and output as CSV
Use perf timechart record / report to generate high level time line
Use perf probe --add kfunc / perf record -e kfunc to trace a custom trace point

You may also want to adapt some of Brendan's one liners:

http://www.brendangregg.com/perf.html

-Andi
-- 
ak@linux.intel.com -- Speaking for myself only.
--
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]


#1302272

FromNamhyung Kim <namhyung@kernel.org>
Date2016-01-06 00:40 +0100
Message-ID<qNJmO-1oM-19@gated-at.bofh.it>
In reply to#1302167
On Tue, Jan 05, 2016 at 09:52:46PM +0100, Andi Kleen wrote:
> > Btw, does anyone have some tips to add? :)
> 
> Use perf script to show individual samples
> Use perf report --percent-limit 5 to only show entires above 5%
> Use perf record -b -g / perf report --branch-history to show branch events
> Use perf record -b / perf report to show branch mispredictions
> Use perf report -M intel to show Intel style assembler 
> Use perf report --sort srcfile to sort by source file
> Use perf report --sort symbol,srcline to sort by source line
> Use perf record -e '{cycles,cache-misses}:S' / perf report --group to associate events

We should enable --group by default if recorded data file has groups IMHO.

Arnaldo, could you please take this?

  https://lkml.org/lkml/2015/11/29/76


> Use perf mem record / perf mem report for memory address profiling
> Use perf stat -I 1000 to count events in intervals
> Use perf stat -I 1000 -x, to count events and output as CSV
> Use perf timechart record / report to generate high level time line
> Use perf probe --add kfunc / perf record -e kfunc to trace a custom trace point

Thanks for sharing!

> 
> You may also want to adapt some of Brendan's one liners:
> 
> http://www.brendangregg.com/perf.html

Will take a look.

Thanks,
Namhyung
--
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]


#1302330

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2016-01-06 03:00 +0100
Message-ID<qNLyi-2LD-7@gated-at.bofh.it>
In reply to#1302272
Em Wed, Jan 06, 2016 at 08:37:53AM +0900, Namhyung Kim escreveu:
> On Tue, Jan 05, 2016 at 09:52:46PM +0100, Andi Kleen wrote:
> > > Btw, does anyone have some tips to add? :)

> > Use perf script to show individual samples
> > Use perf report --percent-limit 5 to only show entires above 5%
> > Use perf record -b -g / perf report --branch-history to show branch events
> > Use perf record -b / perf report to show branch mispredictions
> > Use perf report -M intel to show Intel style assembler 
> > Use perf report --sort srcfile to sort by source file
> > Use perf report --sort symbol,srcline to sort by source line
> > Use perf record -e '{cycles,cache-misses}:S' / perf report --group to associate events
 
> We should enable --group by default if recorded data file has groups IMHO.
 
> Arnaldo, could you please take this?
 
>   https://lkml.org/lkml/2015/11/29/76

Sure, I thought I had merged that already, even noticed that yesterday,
when testing some stuff... Will do tomorrow.
 
> > Use perf mem record / perf mem report for memory address profiling
> > Use perf stat -I 1000 to count events in intervals
> > Use perf stat -I 1000 -x, to count events and output as CSV
> > Use perf timechart record / report to generate high level time line
> > Use perf probe --add kfunc / perf record -e kfunc to trace a custom trace point
 
> Thanks for sharing!
 
> > You may also want to adapt some of Brendan's one liners:

> > http://www.brendangregg.com/perf.html

> Will take a look.

Yeah, that is another source, maybe Brendan can put those together in a
brendan.tips.txt that we could put in the /usr/lib/perf/tips/ directory?
;-) :-)

- 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]


#1304664

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2016-01-08 16:50 +0100
Message-ID<qOHsB-gc-1@gated-at.bofh.it>
In reply to#1302272
Em Wed, Jan 06, 2016 at 08:37:53AM +0900, Namhyung Kim escreveu:
> On Tue, Jan 05, 2016 at 09:52:46PM +0100, Andi Kleen wrote:
> > > Btw, does anyone have some tips to add? :)
> > 
> > Use perf script to show individual samples
> > Use perf report --percent-limit 5 to only show entires above 5%
> > Use perf record -b -g / perf report --branch-history to show branch events
> > Use perf record -b / perf report to show branch mispredictions
> > Use perf report -M intel to show Intel style assembler 
> > Use perf report --sort srcfile to sort by source file
> > Use perf report --sort symbol,srcline to sort by source line
> > Use perf record -e '{cycles,cache-misses}:S' / perf report --group to associate events
> 
> We should enable --group by default if recorded data file has groups IMHO.
> 
> Arnaldo, could you please take this?
> 
>   https://lkml.org/lkml/2015/11/29/76

Applying..
 
> 
> > Use perf mem record / perf mem report for memory address profiling
> > Use perf stat -I 1000 to count events in intervals
> > Use perf stat -I 1000 -x, to count events and output as CSV
> > Use perf timechart record / report to generate high level time line
> > Use perf probe --add kfunc / perf record -e kfunc to trace a custom trace point
> 
> Thanks for sharing!
> 
> > 
> > You may also want to adapt some of Brendan's one liners:
> > 
> > http://www.brendangregg.com/perf.html
> 
> Will take a look.
> 
> Thanks,
> Namhyung

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web