* [PATCH 1/4] perf trace: Enable events when doing system wide tracing and starting a workload
2015-04-23 22:03 [GIT PULL 0/4] perf/urgent fixes Arnaldo Carvalho de Melo
@ 2015-04-23 22:03 ` Arnaldo Carvalho de Melo
2015-04-23 22:03 ` [PATCH 2/4] perf trace: Disable events and drain events when forked workload ends Arnaldo Carvalho de Melo
` (3 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-04-23 22:03 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
Namhyung Kim, Stephane Eranian
From: Arnaldo Carvalho de Melo <acme@redhat.com>
commit f7aa222ff397
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Tue Feb 3 13:25:39 2015 -0300
perf trace: No need to enable evsels for workload started from perf
The assumption was that whenever a workload is specified, the
attr.enable_on_exec evsel flag would be set, but that is not happening
when perf_record_opts.system_wide is set, for instance
That resulted in both perf_evlist__enable() and attr.enable_on_exec
being not called/set, which made the events to remain disabled while the
workload runs, producing no output.
Fix it, by calling perf_evlist__enable() in the 'trace' tool
when forking and not targetting a workload started from trace
v2: Test against !target__none(), as suggested by Namhyung Kim, that is
what is used in perf_evsel__config() when deciding if the
attr.enable_on_exec flag to be set. More work is needed to cover other
cases such as opts->initial_delay.
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-27z7169pvfxgj8upic636syv@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-trace.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index e124741be187..8842218e1856 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2241,10 +2241,11 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
if (err < 0)
goto out_error_mmap;
+ if (!target__none(&trace->opts.target))
+ perf_evlist__enable(evlist);
+
if (forks)
perf_evlist__start_workload(evlist);
- else
- perf_evlist__enable(evlist);
trace->multiple_threads = evlist->threads->map[0] == -1 ||
evlist->threads->nr > 1 ||
--
1.9.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/4] perf trace: Disable events and drain events when forked workload ends
2015-04-23 22:03 [GIT PULL 0/4] perf/urgent fixes Arnaldo Carvalho de Melo
2015-04-23 22:03 ` [PATCH 1/4] perf trace: Enable events when doing system wide tracing and starting a workload Arnaldo Carvalho de Melo
@ 2015-04-23 22:03 ` Arnaldo Carvalho de Melo
2015-04-23 22:03 ` [PATCH 3/4] perf kmem: Consistently use PRIu64 for printing u64 values Arnaldo Carvalho de Melo
` (2 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-04-23 22:03 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
Namhyung Kim, Stephane Eranian
From: Arnaldo Carvalho de Melo <acme@redhat.com>
We were not checking in the inner event processing loop if the forked workload
had finished, which, on a busy system, may make it take a long time trying to
drain events, entering a seemingly neverending loop, waiting for the system to
get idle enough to make it drain the buffers.
Fix it by disabling the events when 'done' is true, in the inner loop, to start
draining what is in the buffers.
Now:
[root@ssdandy ~]# time trace --filter-pids 14003 -a sleep 1 | tail
996.748 ( 0.002 ms): sh/30296 rt_sigprocmask(how: SETMASK, nset: 0x7ffc83418160, sigsetsize: 8) = 0
996.751 ( 0.002 ms): sh/30296 rt_sigprocmask(how: BLOCK, nset: 0x7ffc834181f0, oset: 0x7ffc83418270, sigsetsize: 8) = 0
996.755 ( 0.002 ms): sh/30296 rt_sigaction(sig: INT, act: 0x7ffc83417f50, oact: 0x7ffc83417ff0, sigsetsize: 8) = 0
1004.543 ( 0.362 ms): tail/30198 ... [continued]: read()) = 4096
1004.548 ( 7.791 ms): sh/30296 wait4(upid: -1, stat_addr: 0x7ffc834181a0) ...
1004.975 ( 0.427 ms): tail/30198 read(buf: 0x7633f0, count: 8192) = 4096
1005.390 ( 0.410 ms): tail/30198 read(buf: 0x765410, count: 8192) = 4096
1005.743 ( 0.348 ms): tail/30198 read(buf: 0x7633f0, count: 8192) = 4096
1006.197 ( 0.449 ms): tail/30198 read(buf: 0x765410, count: 8192) = 4096
1006.492 ( 0.290 ms): tail/30198 read(buf: 0x7633f0, count: 8192) = 4096
real 0m1.219s
user 0m0.704s
sys 0m0.331s
[root@ssdandy ~]#
Reported-by: Michael Petlan <mpetlan@redhat.com>
Suggested-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-p6kpn1b26qcbe47pufpw0tex@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-trace.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 8842218e1856..e122970361f2 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2273,6 +2273,11 @@ next_event:
if (interrupted)
goto out_disable;
+
+ if (done && !draining) {
+ perf_evlist__disable(evlist);
+ draining = true;
+ }
}
}
--
1.9.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/4] perf kmem: Consistently use PRIu64 for printing u64 values
2015-04-23 22:03 [GIT PULL 0/4] perf/urgent fixes Arnaldo Carvalho de Melo
2015-04-23 22:03 ` [PATCH 1/4] perf trace: Enable events when doing system wide tracing and starting a workload Arnaldo Carvalho de Melo
2015-04-23 22:03 ` [PATCH 2/4] perf trace: Disable events and drain events when forked workload ends Arnaldo Carvalho de Melo
@ 2015-04-23 22:03 ` Arnaldo Carvalho de Melo
2015-04-23 22:03 ` [PATCH 4/4] tools lib api: Undefine _FORTIFY_SOURCE before setting it Arnaldo Carvalho de Melo
2015-04-24 2:02 ` [GIT PULL 0/4] perf/urgent fixes Namhyung Kim
4 siblings, 0 replies; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-04-23 22:03 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Will Deacon, David Ahern, Jiri Olsa, Joonsoo Kim,
Minchan Kim, Namhyung Kim, Peter Zijlstra,
Arnaldo Carvalho de Melo
From: Will Deacon <will.deacon@arm.com>
Building the perf tool for 32-bit ARM results in the following build
error due to a combination of an incorrect conversion specifier and
compiling with -Werror:
builtin-kmem.c: In function ‘print_page_summary’:
builtin-kmem.c:644:9: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘u64’ [-Werror=format=]
nr_alloc_freed, (total_alloc_freed_bytes) / 1024);
^
builtin-kmem.c:647:9: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘u64’ [-Werror=format=]
(total_page_alloc_bytes - total_alloc_freed_bytes) / 1024);
^
cc1: all warnings being treated as errors
This patch fixes the problem by consistently using PRIu64 for printing
out u64 values.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Joonsoo Kim <js1304@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1429796437-1790-1-git-send-email-will.deacon@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-kmem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 63ea01349b6e..a1915b430044 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -640,9 +640,9 @@ static void print_page_summary(void)
nr_page_frees, total_page_free_bytes / 1024);
printf("\n");
- printf("%-30s: %'16lu [ %'16"PRIu64" KB ]\n", "Total alloc+freed requests",
+ printf("%-30s: %'16"PRIu64" [ %'16"PRIu64" KB ]\n", "Total alloc+freed requests",
nr_alloc_freed, (total_alloc_freed_bytes) / 1024);
- printf("%-30s: %'16lu [ %'16"PRIu64" KB ]\n", "Total alloc-only requests",
+ printf("%-30s: %'16"PRIu64" [ %'16"PRIu64" KB ]\n", "Total alloc-only requests",
nr_page_allocs - nr_alloc_freed,
(total_page_alloc_bytes - total_alloc_freed_bytes) / 1024);
printf("%-30s: %'16lu [ %'16"PRIu64" KB ]\n", "Total free-only requests",
--
1.9.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/4] tools lib api: Undefine _FORTIFY_SOURCE before setting it
2015-04-23 22:03 [GIT PULL 0/4] perf/urgent fixes Arnaldo Carvalho de Melo
` (2 preceding siblings ...)
2015-04-23 22:03 ` [PATCH 3/4] perf kmem: Consistently use PRIu64 for printing u64 values Arnaldo Carvalho de Melo
@ 2015-04-23 22:03 ` Arnaldo Carvalho de Melo
2015-04-24 2:02 ` [GIT PULL 0/4] perf/urgent fixes Namhyung Kim
4 siblings, 0 replies; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-04-23 22:03 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Bobby Powers, Dirk Gouders, Michal Marek,
Paul Mackerras, Peter Zijlstra, linux-kbuild,
Arnaldo Carvalho de Melo
From: Bobby Powers <bobbypowers@gmail.com>
Some toolchains (like Hardened Gentoo) define _FORTIFY_SOURCE in the
built-in, default args. This causes perf builds to fail with:
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>: note: this is the location of the previous definition cc1:
all warnings being treated as errors
To avoid this, undefine _FORTIFY_SOURCE before (possibly re-)defining it
in tools/lib/api.
v2 applies cleanly on top of already pulled kbuild changes for 4.1-rc1.
Signed-off-by: Bobby Powers <bobbypowers@gmail.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Dirk Gouders <dirk@gouders.net>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: linux-kbuild@vger.kernel.org
Link: http://lkml.kernel.org/r/1429658381-3039-1-git-send-email-bobbypowers@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/lib/api/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/api/Makefile b/tools/lib/api/Makefile
index d8fe29fc19a4..8bd960658463 100644
--- a/tools/lib/api/Makefile
+++ b/tools/lib/api/Makefile
@@ -16,7 +16,7 @@ MAKEFLAGS += --no-print-directory
LIBFILE = $(OUTPUT)libapi.a
CFLAGS := $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
-CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -D_FORTIFY_SOURCE=2 -fPIC
+CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC
CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
RM = rm -f
--
1.9.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [GIT PULL 0/4] perf/urgent fixes
2015-04-23 22:03 [GIT PULL 0/4] perf/urgent fixes Arnaldo Carvalho de Melo
` (3 preceding siblings ...)
2015-04-23 22:03 ` [PATCH 4/4] tools lib api: Undefine _FORTIFY_SOURCE before setting it Arnaldo Carvalho de Melo
@ 2015-04-24 2:02 ` Namhyung Kim
2015-04-24 2:09 ` Arnaldo Carvalho de Melo
` (2 more replies)
4 siblings, 3 replies; 11+ messages in thread
From: Namhyung Kim @ 2015-04-24 2:02 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Ingo Molnar, linux-kernel, Adrian Hunter, Bobby Powers,
Borislav Petkov, David Ahern, Dirk Gouders, Don Zickus,
Frederic Weisbecker, Jiri Olsa, Joonsoo Kim, linux-kbuild,
Michael Petlan, Michal Marek, Minchan Kim, Paul Mackerras,
Peter Zijlstra, Stephane Eranian, Will Deacon,
Arnaldo Carvalho de Melo, Javi Merino, Steven Rostedt
Hi Arnaldo,
I've set up some docker containers for build test, and found a couple
of failures.. It seems David's kmem build fix ("perf kmem: Fix
compiles on RHEL6/OL6") which is in your perf/core branch also needs
to be in perf/urgent. Sorry about the kmem breakages..
And I also found this..
>From 581ae7f48c89377755391c3f95637a1d48eefc73 Mon Sep 17 00:00:00 2001
From: Namhyung Kim <namhyung@kernel.org>
Date: Fri, 24 Apr 2015 10:45:16 +0900
Subject: [PATCH] tools lib traceevent: Fix build failure on 32-bit arch
In my i386 build, it failed like this:
CC event-parse.o
event-parse.c: In function 'print_str_arg':
event-parse.c:3868:5: warning: format '%lu' expects argument of type 'long unsigned int',
but argument 3 has type 'uint64_t' [-Wformat]
Cc: Javi Merino <javi.merino@arm.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/lib/traceevent/event-parse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 12a7e2a40c89..aa21bd55bd8a 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -3865,7 +3865,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
} else if (el_size == 4) {
trace_seq_printf(s, "%u", *(uint32_t *)num);
} else if (el_size == 8) {
- trace_seq_printf(s, "%lu", *(uint64_t *)num);
+ trace_seq_printf(s, "%"PRIu64, *(uint64_t *)num);
} else {
trace_seq_printf(s, "BAD SIZE:%d 0x%x",
el_size, *(uint8_t *)num);
--
2.3.4
Thanks,
Namhyung
On Thu, Apr 23, 2015 at 07:03:06PM -0300, Arnaldo Carvalho de Melo wrote:
> Hi Ingo,
>
> Please consider pulling,
>
> - Arnaldo
>
> The following changes since commit 0140e6141e4f1d4b15fb469e6912b0e71b7d1cc2:
>
> perf/x86/intel/uncore: Move PCI IDs for IMC to uncore driver (2015-04-22 08:29:19 +0200)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo
>
> for you to fetch changes up to de28c15daf60e9625bece22f13a091fac8d05f1d:
>
> tools lib api: Undefine _FORTIFY_SOURCE before setting it (2015-04-23 17:08:23 -0300)
>
> ----------------------------------------------------------------
> perf/urgent fixes:
>
> User visible:
>
> - Enable events when doing system wide 'trace' and starting a
> workload, e.g:
>
> # trace -a sleep 1
>
> now it matches the pattern in 'record' and will show envents
> instead of sitting doing nothing while waiting for the started
> workload to finish (Arnaldo Carvalho de Melo)
>
> - Disable and drain events when forked 'trace' workload ends
> making sure we notice the end of the workload instead of
> trying to keep up with the seemingly neverending flux of
> system wide events (Arnaldo Carvalho de Melo)
>
> Infrastructure:
>
> - Fix the build on 32-bit ARM by consistently use PRIu64 for printing u64
> values in 'perf kmem' (Will Deacon)
>
> - Undefine _FORTIFY_SOURCE before setting it in tools/perf/api, fixing the build on
> Hardened Gentoo systems (Bobby Powers)
>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
> perf trace: Enable events when doing system wide tracing and starting a workload
> perf trace: Disable events and drain events when forked workload ends
>
> Bobby Powers (1):
> tools lib api: Undefine _FORTIFY_SOURCE before setting it
>
> Will Deacon (1):
> perf kmem: Consistently use PRIu64 for printing u64 values
>
> tools/lib/api/Makefile | 2 +-
> tools/perf/builtin-kmem.c | 4 ++--
> tools/perf/builtin-trace.c | 10 ++++++++--
> 3 files changed, 11 insertions(+), 5 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/
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [GIT PULL 0/4] perf/urgent fixes
2015-04-24 2:02 ` [GIT PULL 0/4] perf/urgent fixes Namhyung Kim
@ 2015-04-24 2:09 ` Arnaldo Carvalho de Melo
2015-04-24 8:59 ` Javi Merino
2015-05-01 10:14 ` [tip:perf/urgent] tools lib traceevent: Fix build failure on 32-bit arch tip-bot for Namhyung Kim
2 siblings, 0 replies; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-04-24 2:09 UTC (permalink / raw)
To: Namhyung Kim
Cc: Ingo Molnar, linux-kernel, Adrian Hunter, Bobby Powers,
Borislav Petkov, David Ahern, Dirk Gouders, Don Zickus,
Frederic Weisbecker, Jiri Olsa, Joonsoo Kim, linux-kbuild,
Michael Petlan, Michal Marek, Minchan Kim, Paul Mackerras,
Peter Zijlstra, Stephane Eranian, Will Deacon, Javi Merino,
Steven Rostedt
Em Fri, Apr 24, 2015 at 11:02:18AM +0900, Namhyung Kim escreveu:
> Hi Arnaldo,
>
> I've set up some docker containers for build test, and found a couple
> of failures.. It seems David's kmem build fix ("perf kmem: Fix
> compiles on RHEL6/OL6") which is in your perf/core branch also needs
> to be in perf/urgent. Sorry about the kmem breakages..
>
> And I also found this..
I can send those tomorrow, in another pull request to Ingo. I noticed a
few on a RHEL5 machine I tested today, in libtraceevent even, I guess
you was on the CC list for that bug report.
- Arnaldo
>
> >From 581ae7f48c89377755391c3f95637a1d48eefc73 Mon Sep 17 00:00:00 2001
> From: Namhyung Kim <namhyung@kernel.org>
> Date: Fri, 24 Apr 2015 10:45:16 +0900
> Subject: [PATCH] tools lib traceevent: Fix build failure on 32-bit arch
>
> In my i386 build, it failed like this:
>
> CC event-parse.o
> event-parse.c: In function 'print_str_arg':
> event-parse.c:3868:5: warning: format '%lu' expects argument of type 'long unsigned int',
> but argument 3 has type 'uint64_t' [-Wformat]
>
> Cc: Javi Merino <javi.merino@arm.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/lib/traceevent/event-parse.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
> index 12a7e2a40c89..aa21bd55bd8a 100644
> --- a/tools/lib/traceevent/event-parse.c
> +++ b/tools/lib/traceevent/event-parse.c
> @@ -3865,7 +3865,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
> } else if (el_size == 4) {
> trace_seq_printf(s, "%u", *(uint32_t *)num);
> } else if (el_size == 8) {
> - trace_seq_printf(s, "%lu", *(uint64_t *)num);
> + trace_seq_printf(s, "%"PRIu64, *(uint64_t *)num);
> } else {
> trace_seq_printf(s, "BAD SIZE:%d 0x%x",
> el_size, *(uint8_t *)num);
> --
> 2.3.4
>
>
> Thanks,
> Namhyung
>
>
> On Thu, Apr 23, 2015 at 07:03:06PM -0300, Arnaldo Carvalho de Melo wrote:
> > Hi Ingo,
> >
> > Please consider pulling,
> >
> > - Arnaldo
> >
> > The following changes since commit 0140e6141e4f1d4b15fb469e6912b0e71b7d1cc2:
> >
> > perf/x86/intel/uncore: Move PCI IDs for IMC to uncore driver (2015-04-22 08:29:19 +0200)
> >
> > are available in the git repository at:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo
> >
> > for you to fetch changes up to de28c15daf60e9625bece22f13a091fac8d05f1d:
> >
> > tools lib api: Undefine _FORTIFY_SOURCE before setting it (2015-04-23 17:08:23 -0300)
> >
> > ----------------------------------------------------------------
> > perf/urgent fixes:
> >
> > User visible:
> >
> > - Enable events when doing system wide 'trace' and starting a
> > workload, e.g:
> >
> > # trace -a sleep 1
> >
> > now it matches the pattern in 'record' and will show envents
> > instead of sitting doing nothing while waiting for the started
> > workload to finish (Arnaldo Carvalho de Melo)
> >
> > - Disable and drain events when forked 'trace' workload ends
> > making sure we notice the end of the workload instead of
> > trying to keep up with the seemingly neverending flux of
> > system wide events (Arnaldo Carvalho de Melo)
> >
> > Infrastructure:
> >
> > - Fix the build on 32-bit ARM by consistently use PRIu64 for printing u64
> > values in 'perf kmem' (Will Deacon)
> >
> > - Undefine _FORTIFY_SOURCE before setting it in tools/perf/api, fixing the build on
> > Hardened Gentoo systems (Bobby Powers)
> >
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> >
> > ----------------------------------------------------------------
> > Arnaldo Carvalho de Melo (2):
> > perf trace: Enable events when doing system wide tracing and starting a workload
> > perf trace: Disable events and drain events when forked workload ends
> >
> > Bobby Powers (1):
> > tools lib api: Undefine _FORTIFY_SOURCE before setting it
> >
> > Will Deacon (1):
> > perf kmem: Consistently use PRIu64 for printing u64 values
> >
> > tools/lib/api/Makefile | 2 +-
> > tools/perf/builtin-kmem.c | 4 ++--
> > tools/perf/builtin-trace.c | 10 ++++++++--
> > 3 files changed, 11 insertions(+), 5 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/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [GIT PULL 0/4] perf/urgent fixes
2015-04-24 2:02 ` [GIT PULL 0/4] perf/urgent fixes Namhyung Kim
2015-04-24 2:09 ` Arnaldo Carvalho de Melo
@ 2015-04-24 8:59 ` Javi Merino
2015-04-24 16:02 ` Arnaldo Carvalho de Melo
2015-05-01 10:14 ` [tip:perf/urgent] tools lib traceevent: Fix build failure on 32-bit arch tip-bot for Namhyung Kim
2 siblings, 1 reply; 11+ messages in thread
From: Javi Merino @ 2015-04-24 8:59 UTC (permalink / raw)
To: Namhyung Kim
Cc: Arnaldo Carvalho de Melo, Ingo Molnar, linux-kernel,
Adrian Hunter, Bobby Powers, Borislav Petkov, David Ahern,
Dirk Gouders, Don Zickus, Frederic Weisbecker, Jiri Olsa,
Joonsoo Kim, linux-kbuild, Michael Petlan, Michal Marek,
Minchan Kim, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
Will Deacon, Arnaldo Carvalho de Melo, Steven Rostedt
On Fri, Apr 24, 2015 at 03:02:18AM +0100, Namhyung Kim wrote:
> Hi Arnaldo,
>
> I've set up some docker containers for build test, and found a couple
> of failures.. It seems David's kmem build fix ("perf kmem: Fix
> compiles on RHEL6/OL6") which is in your perf/core branch also needs
> to be in perf/urgent. Sorry about the kmem breakages..
>
> And I also found this..
>
>
> From 581ae7f48c89377755391c3f95637a1d48eefc73 Mon Sep 17 00:00:00 2001
> From: Namhyung Kim <namhyung@kernel.org>
> Date: Fri, 24 Apr 2015 10:45:16 +0900
> Subject: [PATCH] tools lib traceevent: Fix build failure on 32-bit arch
>
> In my i386 build, it failed like this:
>
> CC event-parse.o
> event-parse.c: In function 'print_str_arg':
> event-parse.c:3868:5: warning: format '%lu' expects argument of type 'long unsigned int',
> but argument 3 has type 'uint64_t' [-Wformat]
>
> Cc: Javi Merino <javi.merino@arm.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/lib/traceevent/event-parse.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
> index 12a7e2a40c89..aa21bd55bd8a 100644
> --- a/tools/lib/traceevent/event-parse.c
> +++ b/tools/lib/traceevent/event-parse.c
> @@ -3865,7 +3865,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
> } else if (el_size == 4) {
> trace_seq_printf(s, "%u", *(uint32_t *)num);
> } else if (el_size == 8) {
> - trace_seq_printf(s, "%lu", *(uint64_t *)num);
> + trace_seq_printf(s, "%"PRIu64, *(uint64_t *)num);
Didn't know about PRIu64 and friends. FWIW,
Acked-by: Javi Merino <javi.merino@arm.com>
While you are at it, you could also fix the previous "%u" to "%"PRIu32
> } else {
> trace_seq_printf(s, "BAD SIZE:%d 0x%x",
> el_size, *(uint8_t *)num);
> --
> 2.3.4
>
>
> Thanks,
> Namhyung
>
>
> On Thu, Apr 23, 2015 at 07:03:06PM -0300, Arnaldo Carvalho de Melo wrote:
> > Hi Ingo,
> >
> > Please consider pulling,
> >
> > - Arnaldo
> >
> > The following changes since commit 0140e6141e4f1d4b15fb469e6912b0e71b7d1cc2:
> >
> > perf/x86/intel/uncore: Move PCI IDs for IMC to uncore driver (2015-04-22 08:29:19 +0200)
> >
> > are available in the git repository at:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo
> >
> > for you to fetch changes up to de28c15daf60e9625bece22f13a091fac8d05f1d:
> >
> > tools lib api: Undefine _FORTIFY_SOURCE before setting it (2015-04-23 17:08:23 -0300)
> >
> > ----------------------------------------------------------------
> > perf/urgent fixes:
> >
> > User visible:
> >
> > - Enable events when doing system wide 'trace' and starting a
> > workload, e.g:
> >
> > # trace -a sleep 1
> >
> > now it matches the pattern in 'record' and will show envents
> > instead of sitting doing nothing while waiting for the started
> > workload to finish (Arnaldo Carvalho de Melo)
> >
> > - Disable and drain events when forked 'trace' workload ends
> > making sure we notice the end of the workload instead of
> > trying to keep up with the seemingly neverending flux of
> > system wide events (Arnaldo Carvalho de Melo)
> >
> > Infrastructure:
> >
> > - Fix the build on 32-bit ARM by consistently use PRIu64 for printing u64
> > values in 'perf kmem' (Will Deacon)
> >
> > - Undefine _FORTIFY_SOURCE before setting it in tools/perf/api, fixing the build on
> > Hardened Gentoo systems (Bobby Powers)
> >
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> >
> > ----------------------------------------------------------------
> > Arnaldo Carvalho de Melo (2):
> > perf trace: Enable events when doing system wide tracing and starting a workload
> > perf trace: Disable events and drain events when forked workload ends
> >
> > Bobby Powers (1):
> > tools lib api: Undefine _FORTIFY_SOURCE before setting it
> >
> > Will Deacon (1):
> > perf kmem: Consistently use PRIu64 for printing u64 values
> >
> > tools/lib/api/Makefile | 2 +-
> > tools/perf/builtin-kmem.c | 4 ++--
> > tools/perf/builtin-trace.c | 10 ++++++++--
> > 3 files changed, 11 insertions(+), 5 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/
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [GIT PULL 0/4] perf/urgent fixes
2015-04-24 8:59 ` Javi Merino
@ 2015-04-24 16:02 ` Arnaldo Carvalho de Melo
2015-04-24 16:05 ` Will Deacon
0 siblings, 1 reply; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-04-24 16:02 UTC (permalink / raw)
To: Javi Merino
Cc: Namhyung Kim, Ingo Molnar, linux-kernel, Adrian Hunter,
Bobby Powers, Borislav Petkov, David Ahern, Dirk Gouders,
Don Zickus, Frederic Weisbecker, Jiri Olsa, Joonsoo Kim,
linux-kbuild, Michael Petlan, Michal Marek, Minchan Kim,
Paul Mackerras, Peter Zijlstra, Stephane Eranian, Will Deacon,
Steven Rostedt
Em Fri, Apr 24, 2015 at 09:59:18AM +0100, Javi Merino escreveu:
> On Fri, Apr 24, 2015 at 03:02:18AM +0100, Namhyung Kim wrote:
> > Hi Arnaldo,
> >
> > I've set up some docker containers for build test, and found a couple
> > of failures.. It seems David's kmem build fix ("perf kmem: Fix
> > compiles on RHEL6/OL6") which is in your perf/core branch also needs
> > to be in perf/urgent. Sorry about the kmem breakages..
> >
> > And I also found this..
Applied both, some more?
- Arnaldo
> >
> > From 581ae7f48c89377755391c3f95637a1d48eefc73 Mon Sep 17 00:00:00 2001
> > From: Namhyung Kim <namhyung@kernel.org>
> > Date: Fri, 24 Apr 2015 10:45:16 +0900
> > Subject: [PATCH] tools lib traceevent: Fix build failure on 32-bit arch
> >
> > In my i386 build, it failed like this:
> >
> > CC event-parse.o
> > event-parse.c: In function 'print_str_arg':
> > event-parse.c:3868:5: warning: format '%lu' expects argument of type 'long unsigned int',
> > but argument 3 has type 'uint64_t' [-Wformat]
> >
> > Cc: Javi Merino <javi.merino@arm.com>
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---
> > tools/lib/traceevent/event-parse.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
> > index 12a7e2a40c89..aa21bd55bd8a 100644
> > --- a/tools/lib/traceevent/event-parse.c
> > +++ b/tools/lib/traceevent/event-parse.c
> > @@ -3865,7 +3865,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
> > } else if (el_size == 4) {
> > trace_seq_printf(s, "%u", *(uint32_t *)num);
> > } else if (el_size == 8) {
> > - trace_seq_printf(s, "%lu", *(uint64_t *)num);
> > + trace_seq_printf(s, "%"PRIu64, *(uint64_t *)num);
>
> Didn't know about PRIu64 and friends. FWIW,
>
> Acked-by: Javi Merino <javi.merino@arm.com>
>
> While you are at it, you could also fix the previous "%u" to "%"PRIu32
>
> > } else {
> > trace_seq_printf(s, "BAD SIZE:%d 0x%x",
> > el_size, *(uint8_t *)num);
> > --
> > 2.3.4
> >
> >
> > Thanks,
> > Namhyung
> >
> >
> > On Thu, Apr 23, 2015 at 07:03:06PM -0300, Arnaldo Carvalho de Melo wrote:
> > > Hi Ingo,
> > >
> > > Please consider pulling,
> > >
> > > - Arnaldo
> > >
> > > The following changes since commit 0140e6141e4f1d4b15fb469e6912b0e71b7d1cc2:
> > >
> > > perf/x86/intel/uncore: Move PCI IDs for IMC to uncore driver (2015-04-22 08:29:19 +0200)
> > >
> > > are available in the git repository at:
> > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo
> > >
> > > for you to fetch changes up to de28c15daf60e9625bece22f13a091fac8d05f1d:
> > >
> > > tools lib api: Undefine _FORTIFY_SOURCE before setting it (2015-04-23 17:08:23 -0300)
> > >
> > > ----------------------------------------------------------------
> > > perf/urgent fixes:
> > >
> > > User visible:
> > >
> > > - Enable events when doing system wide 'trace' and starting a
> > > workload, e.g:
> > >
> > > # trace -a sleep 1
> > >
> > > now it matches the pattern in 'record' and will show envents
> > > instead of sitting doing nothing while waiting for the started
> > > workload to finish (Arnaldo Carvalho de Melo)
> > >
> > > - Disable and drain events when forked 'trace' workload ends
> > > making sure we notice the end of the workload instead of
> > > trying to keep up with the seemingly neverending flux of
> > > system wide events (Arnaldo Carvalho de Melo)
> > >
> > > Infrastructure:
> > >
> > > - Fix the build on 32-bit ARM by consistently use PRIu64 for printing u64
> > > values in 'perf kmem' (Will Deacon)
> > >
> > > - Undefine _FORTIFY_SOURCE before setting it in tools/perf/api, fixing the build on
> > > Hardened Gentoo systems (Bobby Powers)
> > >
> > > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > >
> > > ----------------------------------------------------------------
> > > Arnaldo Carvalho de Melo (2):
> > > perf trace: Enable events when doing system wide tracing and starting a workload
> > > perf trace: Disable events and drain events when forked workload ends
> > >
> > > Bobby Powers (1):
> > > tools lib api: Undefine _FORTIFY_SOURCE before setting it
> > >
> > > Will Deacon (1):
> > > perf kmem: Consistently use PRIu64 for printing u64 values
> > >
> > > tools/lib/api/Makefile | 2 +-
> > > tools/perf/builtin-kmem.c | 4 ++--
> > > tools/perf/builtin-trace.c | 10 ++++++++--
> > > 3 files changed, 11 insertions(+), 5 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/
> >
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [GIT PULL 0/4] perf/urgent fixes
2015-04-24 16:02 ` Arnaldo Carvalho de Melo
@ 2015-04-24 16:05 ` Will Deacon
0 siblings, 0 replies; 11+ messages in thread
From: Will Deacon @ 2015-04-24 16:05 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Javi Merino, Namhyung Kim, Ingo Molnar, linux-kernel,
Adrian Hunter, Bobby Powers, Borislav Petkov, David Ahern,
Dirk Gouders, Don Zickus, Frederic Weisbecker, Jiri Olsa,
Joonsoo Kim, linux-kbuild, Michael Petlan, Michal Marek,
Minchan Kim, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
Steven Rostedt
On Fri, Apr 24, 2015 at 05:02:17PM +0100, Arnaldo Carvalho de Melo wrote:
> Em Fri, Apr 24, 2015 at 09:59:18AM +0100, Javi Merino escreveu:
> > On Fri, Apr 24, 2015 at 03:02:18AM +0100, Namhyung Kim wrote:
> > > Hi Arnaldo,
> > >
> > > I've set up some docker containers for build test, and found a couple
> > > of failures.. It seems David's kmem build fix ("perf kmem: Fix
> > > compiles on RHEL6/OL6") which is in your perf/core branch also needs
> > > to be in perf/urgent. Sorry about the kmem breakages..
> > >
> > > And I also found this..
>
> Applied both, some more?
The only issue remaining for arm/arm64 is the /proc/cpuinfo parsing, which
ends up with us passing -jN to Make, where N is 5 or 6 times the number of
CPUs in the system.
http://permalink.gmane.org/gmane.linux.kernel/1936575
Will
^ permalink raw reply [flat|nested] 11+ messages in thread
* [tip:perf/urgent] tools lib traceevent: Fix build failure on 32-bit arch
2015-04-24 2:02 ` [GIT PULL 0/4] perf/urgent fixes Namhyung Kim
2015-04-24 2:09 ` Arnaldo Carvalho de Melo
2015-04-24 8:59 ` Javi Merino
@ 2015-05-01 10:14 ` tip-bot for Namhyung Kim
2 siblings, 0 replies; 11+ messages in thread
From: tip-bot for Namhyung Kim @ 2015-05-01 10:14 UTC (permalink / raw)
To: linux-tip-commits
Cc: tglx, namhyung, javi.merino, mingo, linux-kernel, acme, hpa
Commit-ID: 410ceb8f2f1d4edeb02d229ef192e76602005b8b
Gitweb: http://git.kernel.org/tip/410ceb8f2f1d4edeb02d229ef192e76602005b8b
Author: Namhyung Kim <namhyung@kernel.org>
AuthorDate: Fri, 24 Apr 2015 10:45:16 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 24 Apr 2015 12:47:10 -0300
tools lib traceevent: Fix build failure on 32-bit arch
In my i386 build, it failed like this:
CC event-parse.o
event-parse.c: In function 'print_str_arg':
event-parse.c:3868:5: warning: format '%lu' expects argument of type 'long unsigned int',
but argument 3 has type 'uint64_t' [-Wformat]
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Javi Merino <javi.merino@arm.com>
Link: http://lkml.kernel.org/r/20150424020218.GF1905@sejong
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/lib/traceevent/event-parse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 12a7e2a..aa21bd5 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -3865,7 +3865,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
} else if (el_size == 4) {
trace_seq_printf(s, "%u", *(uint32_t *)num);
} else if (el_size == 8) {
- trace_seq_printf(s, "%lu", *(uint64_t *)num);
+ trace_seq_printf(s, "%"PRIu64, *(uint64_t *)num);
} else {
trace_seq_printf(s, "BAD SIZE:%d 0x%x",
el_size, *(uint8_t *)num);
^ permalink raw reply related [flat|nested] 11+ messages in thread