All of lore.kernel.org
 help / color / mirror / Atom feed
* Some minor fixes for perf user tools
@ 2018-04-06 20:38 Andi Kleen
  2018-04-06 20:38 ` [PATCH 1/4] perf, tools, mem: Allow all record/report options Andi Kleen
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Andi Kleen @ 2018-04-06 20:38 UTC (permalink / raw)
  To: acme; +Cc: jolsa, linux-kernel

This patchkit fixes some random minor issues in the perf user tools

-Andi

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/4] perf, tools, mem: Allow all record/report options
  2018-04-06 20:38 Some minor fixes for perf user tools Andi Kleen
@ 2018-04-06 20:38 ` Andi Kleen
  2018-04-21  7:50   ` [tip:perf/urgent] perf " tip-bot for Andi Kleen
  2018-04-06 20:38 ` [PATCH 2/4] perf, tools: Clarify browser help Andi Kleen
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Andi Kleen @ 2018-04-06 20:38 UTC (permalink / raw)
  To: acme; +Cc: jolsa, linux-kernel, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

For perf mem report / perf mem record, pass all unknown options
through to the underlying report/record commands. This makes things
like

perf mem record -a sleep 1

work. Matches how c2c and other tools work.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 tools/perf/Documentation/perf-mem.txt | 3 +++
 tools/perf/builtin-mem.c              | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/perf/Documentation/perf-mem.txt b/tools/perf/Documentation/perf-mem.txt
index b0211410969b..8806ed5f3802 100644
--- a/tools/perf/Documentation/perf-mem.txt
+++ b/tools/perf/Documentation/perf-mem.txt
@@ -67,6 +67,9 @@ OPTIONS
 --phys-data::
 	Record/Report sample physical addresses
 
+In addition, for report all perf report options are valid, and for record
+all perf record options.
+
 SEE ALSO
 --------
 linkperf:perf-record[1], linkperf:perf-report[1]
diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c
index 506564651cda..57393e94d156 100644
--- a/tools/perf/builtin-mem.c
+++ b/tools/perf/builtin-mem.c
@@ -83,7 +83,7 @@ static int __cmd_record(int argc, const char **argv, struct perf_mem *mem)
 	};
 
 	argc = parse_options(argc, argv, options, record_mem_usage,
-			     PARSE_OPT_STOP_AT_NON_OPTION);
+			     PARSE_OPT_KEEP_UNKNOWN);
 
 	rec_argc = argc + 9; /* max number of arguments */
 	rec_argv = calloc(rec_argc + 1, sizeof(char *));
@@ -436,7 +436,7 @@ int cmd_mem(int argc, const char **argv)
 	}
 
 	argc = parse_options_subcommand(argc, argv, mem_options, mem_subcommands,
-					mem_usage, PARSE_OPT_STOP_AT_NON_OPTION);
+					mem_usage, PARSE_OPT_KEEP_UNKNOWN);
 
 	if (!argc || !(strncmp(argv[0], "rec", 3) || mem.operation))
 		usage_with_options(mem_usage, mem_options);
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/4] perf, tools: Clarify browser help
  2018-04-06 20:38 Some minor fixes for perf user tools Andi Kleen
  2018-04-06 20:38 ` [PATCH 1/4] perf, tools, mem: Allow all record/report options Andi Kleen
@ 2018-04-06 20:38 ` Andi Kleen
  2018-04-21  7:51   ` [tip:perf/urgent] perf hists browser: Clarify top/report " tip-bot for Andi Kleen
  2018-04-06 20:38 ` [PATCH 3/4] perf, tools, record: Remove misleading error suggestion Andi Kleen
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Andi Kleen @ 2018-04-06 20:38 UTC (permalink / raw)
  To: acme; +Cc: jolsa, linux-kernel, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

Clarify in the browser help that ESC in tui mode may go back to the
previous screen instead of just exiting (was not clear to me)

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 tools/perf/ui/browsers/hists.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 8b4e82548f8e..0abbc0048a8e 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -2788,7 +2788,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 	"h/?/F1        Show this window\n"				\
 	"UP/DOWN/PGUP\n"						\
 	"PGDN/SPACE    Navigate\n"					\
-	"q/ESC/CTRL+C  Exit browser\n\n"				\
+	"q/ESC/CTRL+C  Exit browser or go back to previous screen\n\n"	\
 	"For multiple event sessions:\n\n"				\
 	"TAB/UNTAB     Switch events\n\n"				\
 	"For symbolic views (--sort has sym):\n\n"			\
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/4] perf, tools, record: Remove misleading error suggestion
  2018-04-06 20:38 Some minor fixes for perf user tools Andi Kleen
  2018-04-06 20:38 ` [PATCH 1/4] perf, tools, mem: Allow all record/report options Andi Kleen
  2018-04-06 20:38 ` [PATCH 2/4] perf, tools: Clarify browser help Andi Kleen
@ 2018-04-06 20:38 ` Andi Kleen
  2018-04-21  7:51   ` [tip:perf/urgent] perf " tip-bot for Andi Kleen
  2018-04-06 20:38 ` [PATCH 4/4] perf, tools, record: Remove suggestion to enable APIC Andi Kleen
  2018-04-13 13:13 ` Some minor fixes for perf user tools Jiri Olsa
  4 siblings, 1 reply; 11+ messages in thread
From: Andi Kleen @ 2018-04-06 20:38 UTC (permalink / raw)
  To: acme; +Cc: jolsa, linux-kernel, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

When perf record encounters an error setting up an event it suggests
to enable CONFIG_PERF_EVENTS. This is misleading because:
- Usually it is enabled (it is really hard to disable on x86)
- The problem is usually somewhere else, e.g. the CPU is not supported
or an invalid configuration has been used.

Remove the misleading suggestion.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 tools/perf/util/evsel.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 1ac8d9236efd..66b62570c855 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -2894,8 +2894,7 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,
 
 	return scnprintf(msg, size,
 	"The sys_perf_event_open() syscall returned with %d (%s) for event (%s).\n"
-	"/bin/dmesg may provide additional information.\n"
-	"No CONFIG_PERF_EVENTS=y kernel support configured?",
+	"/bin/dmesg | grep -i perf may provide additional information.\n",
 			 err, str_error_r(err, sbuf, sizeof(sbuf)),
 			 perf_evsel__name(evsel));
 }
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/4] perf, tools, record: Remove suggestion to enable APIC
  2018-04-06 20:38 Some minor fixes for perf user tools Andi Kleen
                   ` (2 preceding siblings ...)
  2018-04-06 20:38 ` [PATCH 3/4] perf, tools, record: Remove misleading error suggestion Andi Kleen
@ 2018-04-06 20:38 ` Andi Kleen
  2018-04-21  7:52   ` [tip:perf/urgent] perf " tip-bot for Andi Kleen
  2018-04-13 13:13 ` Some minor fixes for perf user tools Jiri Olsa
  4 siblings, 1 reply; 11+ messages in thread
From: Andi Kleen @ 2018-04-06 20:38 UTC (permalink / raw)
  To: acme; +Cc: jolsa, linux-kernel, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

perf record suggests to enable the APIC on errors.

APIC is practically always used today and the problem is usually somewhere else.

Just remove the outdated suggestion.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 tools/perf/util/evsel.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 66b62570c855..3e87486c28fe 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -2870,8 +2870,7 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,
 #if defined(__i386__) || defined(__x86_64__)
 		if (evsel->attr.type == PERF_TYPE_HARDWARE)
 			return scnprintf(msg, size, "%s",
-	"No hardware sampling interrupt available.\n"
-	"No APIC? If so then you can boot the kernel with the \"lapic\" boot parameter to force-enable it.");
+	"No hardware sampling interrupt available.\n");
 #endif
 		break;
 	case EBUSY:
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: Some minor fixes for perf user tools
  2018-04-06 20:38 Some minor fixes for perf user tools Andi Kleen
                   ` (3 preceding siblings ...)
  2018-04-06 20:38 ` [PATCH 4/4] perf, tools, record: Remove suggestion to enable APIC Andi Kleen
@ 2018-04-13 13:13 ` Jiri Olsa
  2018-04-13 14:33   ` Arnaldo Carvalho de Melo
  4 siblings, 1 reply; 11+ messages in thread
From: Jiri Olsa @ 2018-04-13 13:13 UTC (permalink / raw)
  To: Andi Kleen; +Cc: acme, jolsa, linux-kernel

On Fri, Apr 06, 2018 at 01:38:08PM -0700, Andi Kleen wrote:
> This patchkit fixes some random minor issues in the perf user tools

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Some minor fixes for perf user tools
  2018-04-13 13:13 ` Some minor fixes for perf user tools Jiri Olsa
@ 2018-04-13 14:33   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-04-13 14:33 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: Andi Kleen, jolsa, linux-kernel

Em Fri, Apr 13, 2018 at 03:13:09PM +0200, Jiri Olsa escreveu:
> On Fri, Apr 06, 2018 at 01:38:08PM -0700, Andi Kleen wrote:
> > This patchkit fixes some random minor issues in the perf user tools
> 
> Acked-by: Jiri Olsa <jolsa@kernel.org>

Thanks, applied.

- Arnaldo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [tip:perf/urgent] perf mem: Allow all record/report options
  2018-04-06 20:38 ` [PATCH 1/4] perf, tools, mem: Allow all record/report options Andi Kleen
@ 2018-04-21  7:50   ` tip-bot for Andi Kleen
  0 siblings, 0 replies; 11+ messages in thread
From: tip-bot for Andi Kleen @ 2018-04-21  7:50 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: ak, tglx, hpa, acme, mingo, linux-kernel, jolsa

Commit-ID:  a7e9eab3dbd35268c16244557a4155a2d9a641c3
Gitweb:     https://git.kernel.org/tip/a7e9eab3dbd35268c16244557a4155a2d9a641c3
Author:     Andi Kleen <ak@linux.intel.com>
AuthorDate: Fri, 6 Apr 2018 13:38:09 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 18 Apr 2018 15:35:48 -0300

perf mem: Allow all record/report options

For perf mem report / perf mem record, pass all unknown options
through to the underlying report/record commands. This makes things
like

perf mem record -a sleep 1

work. Matches how c2c and other tools work.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/20180406203812.3087-2-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-mem.txt | 3 +++
 tools/perf/builtin-mem.c              | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/perf/Documentation/perf-mem.txt b/tools/perf/Documentation/perf-mem.txt
index b0211410969b..8806ed5f3802 100644
--- a/tools/perf/Documentation/perf-mem.txt
+++ b/tools/perf/Documentation/perf-mem.txt
@@ -67,6 +67,9 @@ OPTIONS
 --phys-data::
 	Record/Report sample physical addresses
 
+In addition, for report all perf report options are valid, and for record
+all perf record options.
+
 SEE ALSO
 --------
 linkperf:perf-record[1], linkperf:perf-report[1]
diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c
index 506564651cda..57393e94d156 100644
--- a/tools/perf/builtin-mem.c
+++ b/tools/perf/builtin-mem.c
@@ -83,7 +83,7 @@ static int __cmd_record(int argc, const char **argv, struct perf_mem *mem)
 	};
 
 	argc = parse_options(argc, argv, options, record_mem_usage,
-			     PARSE_OPT_STOP_AT_NON_OPTION);
+			     PARSE_OPT_KEEP_UNKNOWN);
 
 	rec_argc = argc + 9; /* max number of arguments */
 	rec_argv = calloc(rec_argc + 1, sizeof(char *));
@@ -436,7 +436,7 @@ int cmd_mem(int argc, const char **argv)
 	}
 
 	argc = parse_options_subcommand(argc, argv, mem_options, mem_subcommands,
-					mem_usage, PARSE_OPT_STOP_AT_NON_OPTION);
+					mem_usage, PARSE_OPT_KEEP_UNKNOWN);
 
 	if (!argc || !(strncmp(argv[0], "rec", 3) || mem.operation))
 		usage_with_options(mem_usage, mem_options);

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [tip:perf/urgent] perf hists browser: Clarify top/report browser help
  2018-04-06 20:38 ` [PATCH 2/4] perf, tools: Clarify browser help Andi Kleen
@ 2018-04-21  7:51   ` tip-bot for Andi Kleen
  0 siblings, 0 replies; 11+ messages in thread
From: tip-bot for Andi Kleen @ 2018-04-21  7:51 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: tglx, mingo, acme, linux-kernel, hpa, jolsa, ak

Commit-ID:  6a02f06edea5a5910c787fd6c49b0552e8080e5d
Gitweb:     https://git.kernel.org/tip/6a02f06edea5a5910c787fd6c49b0552e8080e5d
Author:     Andi Kleen <ak@linux.intel.com>
AuthorDate: Fri, 6 Apr 2018 13:38:10 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 18 Apr 2018 15:35:49 -0300

perf hists browser: Clarify top/report browser help

Clarify in the browser help that ESC in tui mode may go back to the
previous screen instead of just exiting (was not clear to me)

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/20180406203812.3087-3-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/ui/browsers/hists.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 0eec06c105c6..e5f247247daa 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -2714,7 +2714,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 	"h/?/F1        Show this window\n"				\
 	"UP/DOWN/PGUP\n"						\
 	"PGDN/SPACE    Navigate\n"					\
-	"q/ESC/CTRL+C  Exit browser\n\n"				\
+	"q/ESC/CTRL+C  Exit browser or go back to previous screen\n\n"	\
 	"For multiple event sessions:\n\n"				\
 	"TAB/UNTAB     Switch events\n\n"				\
 	"For symbolic views (--sort has sym):\n\n"			\

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [tip:perf/urgent] perf record: Remove misleading error suggestion
  2018-04-06 20:38 ` [PATCH 3/4] perf, tools, record: Remove misleading error suggestion Andi Kleen
@ 2018-04-21  7:51   ` tip-bot for Andi Kleen
  0 siblings, 0 replies; 11+ messages in thread
From: tip-bot for Andi Kleen @ 2018-04-21  7:51 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: acme, jolsa, hpa, ak, mingo, tglx, linux-kernel

Commit-ID:  ec3948451e0ba317e66873b48d6cc51d701d4eb0
Gitweb:     https://git.kernel.org/tip/ec3948451e0ba317e66873b48d6cc51d701d4eb0
Author:     Andi Kleen <ak@linux.intel.com>
AuthorDate: Fri, 6 Apr 2018 13:38:11 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 18 Apr 2018 15:35:49 -0300

perf record: Remove misleading error suggestion

When perf record encounters an error setting up an event it suggests
to enable CONFIG_PERF_EVENTS. This is misleading because:

- Usually it is enabled (it is really hard to disable on x86)

- The problem is usually somewhere else, e.g. the CPU is not supported
or an invalid configuration has been used.

Remove the misleading suggestion.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/20180406203812.3087-4-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/evsel.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 1ac8d9236efd..66b62570c855 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -2894,8 +2894,7 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,
 
 	return scnprintf(msg, size,
 	"The sys_perf_event_open() syscall returned with %d (%s) for event (%s).\n"
-	"/bin/dmesg may provide additional information.\n"
-	"No CONFIG_PERF_EVENTS=y kernel support configured?",
+	"/bin/dmesg | grep -i perf may provide additional information.\n",
 			 err, str_error_r(err, sbuf, sizeof(sbuf)),
 			 perf_evsel__name(evsel));
 }

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [tip:perf/urgent] perf record: Remove suggestion to enable APIC
  2018-04-06 20:38 ` [PATCH 4/4] perf, tools, record: Remove suggestion to enable APIC Andi Kleen
@ 2018-04-21  7:52   ` tip-bot for Andi Kleen
  0 siblings, 0 replies; 11+ messages in thread
From: tip-bot for Andi Kleen @ 2018-04-21  7:52 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: ak, jolsa, tglx, mingo, acme, linux-kernel, hpa

Commit-ID:  ccbb6afe0890b09cc828373a9a5fffab40ec85df
Gitweb:     https://git.kernel.org/tip/ccbb6afe0890b09cc828373a9a5fffab40ec85df
Author:     Andi Kleen <ak@linux.intel.com>
AuthorDate: Fri, 6 Apr 2018 13:38:12 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 18 Apr 2018 15:35:50 -0300

perf record: Remove suggestion to enable APIC

'perf record' suggests to enable the APIC on errors.

APIC is practically always used today and the problem is usually
somewhere else.

Just remove the outdated suggestion.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/20180406203812.3087-5-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/evsel.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 66b62570c855..3e87486c28fe 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -2870,8 +2870,7 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,
 #if defined(__i386__) || defined(__x86_64__)
 		if (evsel->attr.type == PERF_TYPE_HARDWARE)
 			return scnprintf(msg, size, "%s",
-	"No hardware sampling interrupt available.\n"
-	"No APIC? If so then you can boot the kernel with the \"lapic\" boot parameter to force-enable it.");
+	"No hardware sampling interrupt available.\n");
 #endif
 		break;
 	case EBUSY:

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-04-21  7:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-06 20:38 Some minor fixes for perf user tools Andi Kleen
2018-04-06 20:38 ` [PATCH 1/4] perf, tools, mem: Allow all record/report options Andi Kleen
2018-04-21  7:50   ` [tip:perf/urgent] perf " tip-bot for Andi Kleen
2018-04-06 20:38 ` [PATCH 2/4] perf, tools: Clarify browser help Andi Kleen
2018-04-21  7:51   ` [tip:perf/urgent] perf hists browser: Clarify top/report " tip-bot for Andi Kleen
2018-04-06 20:38 ` [PATCH 3/4] perf, tools, record: Remove misleading error suggestion Andi Kleen
2018-04-21  7:51   ` [tip:perf/urgent] perf " tip-bot for Andi Kleen
2018-04-06 20:38 ` [PATCH 4/4] perf, tools, record: Remove suggestion to enable APIC Andi Kleen
2018-04-21  7:52   ` [tip:perf/urgent] perf " tip-bot for Andi Kleen
2018-04-13 13:13 ` Some minor fixes for perf user tools Jiri Olsa
2018-04-13 14:33   ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.