public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 00/13] perf/core fixes and improvements
@ 2012-03-16 20:01 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-03-16 20:01 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Jan Beulich, Jiri Olsa,
	Namhyung Kim, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	arnaldo.melo, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit bea95c152dee1791dd02cbc708afbb115bb00f9a:

  Merge branch 'perf/hw-branch-sampling' into perf/core (2012-03-12 20:47:05 +0100)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo

for you to fetch changes up to 6db6127c4dad634ab98709b81e2f2770890b0d53:

  perf report: Treat an argument as a symbol filter (2012-03-16 16:44:36 -0300)

----------------------------------------------------------------
The event parsing patches from Jiri Olsa plus the filter by symbol and group
fixes by Namhyung Kim.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Jan Beulich (1):
      perf tools: Adjust make rules

Jiri Olsa (5):
      perf: Adding sysfs group format attribute for pmu device
      perf tools: Add parser generator for events parsing
      perf tools: Add config options support for event parsing
      perf tools: Add perf pmu object to access pmu format definition
      perf tools: Add support to specify pmu style event

Namhyung Kim (7):
      perf stat: Fix event grouping on forked task
      perf tools: Do not disable members of group event
      perf hists: Add hists__filter_by_symbol
      perf ui browser: Introduce ui_browser__input_window
      perf ui browser: Add 's' key to filter by symbol name
      perf report: Add --symbol-filter option
      perf report: Treat an argument as a symbol filter

 .../testing/sysfs-bus-event_source-devices-format  |   14 +
 arch/x86/kernel/cpu/perf_event.c                   |    7 +
 arch/x86/kernel/cpu/perf_event.h                   |    1 +
 arch/x86/kernel/cpu/perf_event_amd.c               |   18 +
 arch/x86/kernel/cpu/perf_event_intel.c             |   36 +
 arch/x86/kernel/cpu/perf_event_p6.c                |   19 +
 include/linux/perf_event.h                         |   14 +
 tools/perf/Makefile                                |   35 +-
 tools/perf/builtin-report.c                        |   21 +-
 tools/perf/builtin-stat.c                          |    2 +-
 tools/perf/builtin-test.c                          |   58 +-
 tools/perf/util/evlist.c                           |    6 +-
 tools/perf/util/evsel.c                            |    6 +-
 tools/perf/util/evsel.h                            |    3 +-
 tools/perf/util/hist.c                             |   35 +
 tools/perf/util/hist.h                             |    2 +
 tools/perf/util/parse-events-bison.c               | 1852 ++++++++++++++++
 tools/perf/util/parse-events-bison.h               |   82 +
 tools/perf/util/parse-events-flex.c                | 2272 ++++++++++++++++++++
 tools/perf/util/parse-events-flex.h                |  316 +++
 tools/perf/util/parse-events.c                     |  590 +++--
 tools/perf/util/parse-events.h                     |   46 +
 tools/perf/util/parse-events.l                     |  126 ++
 tools/perf/util/parse-events.y                     |  217 ++
 tools/perf/util/pmu-bison.c                        | 1663 ++++++++++++++
 tools/perf/util/pmu-bison.h                        |   73 +
 tools/perf/util/pmu-flex.c                         | 1821 ++++++++++++++++
 tools/perf/util/pmu-flex.h                         |  316 +++
 tools/perf/util/pmu.c                              |  469 ++++
 tools/perf/util/pmu.h                              |   41 +
 tools/perf/util/pmu.l                              |   43 +
 tools/perf/util/pmu.y                              |   93 +
 tools/perf/util/ui/browser.h                       |    2 +
 tools/perf/util/ui/browsers/hists.c                |   14 +-
 tools/perf/util/ui/keysyms.h                       |    2 +
 tools/perf/util/ui/util.c                          |   78 +
 36 files changed, 10048 insertions(+), 345 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices-format
 create mode 100644 tools/perf/util/parse-events-bison.c
 create mode 100644 tools/perf/util/parse-events-bison.h
 create mode 100644 tools/perf/util/parse-events-flex.c
 create mode 100644 tools/perf/util/parse-events-flex.h
 create mode 100644 tools/perf/util/parse-events.l
 create mode 100644 tools/perf/util/parse-events.y
 create mode 100644 tools/perf/util/pmu-bison.c
 create mode 100644 tools/perf/util/pmu-bison.h
 create mode 100644 tools/perf/util/pmu-flex.c
 create mode 100644 tools/perf/util/pmu-flex.h
 create mode 100644 tools/perf/util/pmu.c
 create mode 100644 tools/perf/util/pmu.h
 create mode 100644 tools/perf/util/pmu.l
 create mode 100644 tools/perf/util/pmu.y

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

* [GIT PULL 00/13] perf/core fixes and improvements
@ 2012-04-11 21:05 Arnaldo Carvalho de Melo
  2012-04-13  7:58 ` Ingo Molnar
  0 siblings, 1 reply; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-04-11 21:05 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Andi Kleen, Ashay Rane,
	Borislav Petkov, Corey Ashford, David Ahern, Frederic Weisbecker,
	Jiri Olsa, Masami Hiramatsu, Michal Marek, Mike Galbraith,
	Namhyung Kim, Namhyung Kim, Paul Mackerras, Pekka Enberg,
	Peter Zijlstra, Robert Richter, Sam Ravnborg, Stephane Eranian,
	arnaldo.melo, Arnaldo Carvalho de Melo

Hi Ingo,

	This is on top of the previous pull request, please consider pulling.

- Arnaldo

The following changes since commit d3d1f61acf62204bb7b2b4509329247bffaedd7c:

  perf annotate browser: string search: /?n (2012-04-07 17:37:22 -0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo

for you to fetch changes up to 5a7ed29c7572d00a75e8c4529e30c5ac2ef82271:

  perf record: Use sw counter only if hw pmu is not detected (2012-04-11 17:39:19 -0300)

----------------------------------------------------------------
Fixes and improvements for perf/core:

. Overhaul the tools/ makefiles, gluing them to the top level Makefile, from
  Borislav Petkov.

. Move the UI files from tools/perf/util/ui/ to tools/perf/ui/. Also move
  the GTK+ browser to tools/perf/ui/gtk/, from Namhyung Kim.

. Only fallback to sw cycles counter on ENOENT for the hw cycles, from
  Robert Richter

. Trivial fixes from Robert Richter

. Handle the autogenerated bison/flex files better, from Namhyung and Jiri Olsa.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Borislav Petkov (5):
      tools: Add Makefile.include
      tools: Cleanup EXTRA_WARNINGS
      tools: Add a toplevel Makefile
      tools: Add a help target
      tools: Connect to the kernel build system

Jiri Olsa (1):
      perf tools: Fix parsers' rules to dependencies

Namhyung Kim (4):
      perf tools: Ignore auto-generated bison/flex files
      perf annotate: Fix a build error
      perf tools: Move UI bits to tools/perf/ui directory
      perf tools: Move GTK+ bits to tools/perf/ui/gtk directory

Robert Richter (3):
      perf stat: Declare some references static
      perf tools: Fix thread map that is type pid_t
      perf record: Use sw counter only if hw pmu is not detected

 Makefile                                     |    7 ++
 tools/Makefile                               |   77 ++++++++++++++++++
 tools/perf/.gitignore                        |    2 +
 tools/perf/Makefile                          |  110 ++++++++------------------
 tools/perf/builtin-record.c                  |    2 +-
 tools/perf/builtin-stat.c                    |   26 +++---
 tools/perf/{util => }/ui/browser.c           |    0
 tools/perf/{util => }/ui/browser.h           |    0
 tools/perf/{util => }/ui/browsers/annotate.c |   10 +--
 tools/perf/{util => }/ui/browsers/hists.c    |   12 +--
 tools/perf/{util => }/ui/browsers/map.c      |    6 +-
 tools/perf/{util => }/ui/browsers/map.h      |    0
 tools/perf/{util => ui}/gtk/browser.c        |    0
 tools/perf/{util => ui}/gtk/gtk.h            |    0
 tools/perf/{util => }/ui/helpline.c          |    0
 tools/perf/{util => }/ui/helpline.h          |    0
 tools/perf/{util => }/ui/keysyms.h           |    0
 tools/perf/{util => }/ui/libslang.h          |    0
 tools/perf/{util => }/ui/progress.c          |    0
 tools/perf/{util => }/ui/progress.h          |    0
 tools/perf/{util => }/ui/setup.c             |    0
 tools/perf/{util => }/ui/ui.h                |    0
 tools/perf/{util => }/ui/util.c              |    0
 tools/perf/{util => }/ui/util.h              |    0
 tools/perf/util/annotate.c                   |    4 +-
 tools/perf/util/debug.h                      |    2 +-
 tools/perf/util/hist.h                       |    2 +-
 tools/perf/util/thread_map.h                 |    2 +-
 tools/scripts/Makefile.include               |   57 +++++++++++++
 29 files changed, 207 insertions(+), 112 deletions(-)
 create mode 100644 tools/Makefile
 rename tools/perf/{util => }/ui/browser.c (100%)
 rename tools/perf/{util => }/ui/browser.h (100%)
 rename tools/perf/{util => }/ui/browsers/annotate.c (99%)
 rename tools/perf/{util => }/ui/browsers/hists.c (99%)
 rename tools/perf/{util => }/ui/browsers/map.c (97%)
 rename tools/perf/{util => }/ui/browsers/map.h (100%)
 rename tools/perf/{util => ui}/gtk/browser.c (100%)
 rename tools/perf/{util => ui}/gtk/gtk.h (100%)
 rename tools/perf/{util => }/ui/helpline.c (100%)
 rename tools/perf/{util => }/ui/helpline.h (100%)
 rename tools/perf/{util => }/ui/keysyms.h (100%)
 rename tools/perf/{util => }/ui/libslang.h (100%)
 rename tools/perf/{util => }/ui/progress.c (100%)
 rename tools/perf/{util => }/ui/progress.h (100%)
 rename tools/perf/{util => }/ui/setup.c (100%)
 rename tools/perf/{util => }/ui/ui.h (100%)
 rename tools/perf/{util => }/ui/util.c (100%)
 rename tools/perf/{util => }/ui/util.h (100%)
 create mode 100644 tools/scripts/Makefile.include

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

* Re: [GIT PULL 00/13] perf/core fixes and improvements
  2012-04-11 21:05 Arnaldo Carvalho de Melo
@ 2012-04-13  7:58 ` Ingo Molnar
  0 siblings, 0 replies; 18+ messages in thread
From: Ingo Molnar @ 2012-04-13  7:58 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Andi Kleen, Ashay Rane, Borislav Petkov,
	Corey Ashford, David Ahern, Frederic Weisbecker, Jiri Olsa,
	Masami Hiramatsu, Michal Marek, Mike Galbraith, Namhyung Kim,
	Namhyung Kim, Paul Mackerras, Pekka Enberg, Peter Zijlstra,
	Robert Richter, Sam Ravnborg, Stephane Eranian, arnaldo.melo,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:

> Hi Ingo,
> 
> 	This is on top of the previous pull request, please consider pulling.
> 
> - Arnaldo
> 
> The following changes since commit d3d1f61acf62204bb7b2b4509329247bffaedd7c:
> 
>   perf annotate browser: string search: /?n (2012-04-07 17:37:22 -0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
> 
> for you to fetch changes up to 5a7ed29c7572d00a75e8c4529e30c5ac2ef82271:
> 
>   perf record: Use sw counter only if hw pmu is not detected (2012-04-11 17:39:19 -0300)
> 
> ----------------------------------------------------------------
> Fixes and improvements for perf/core:
> 
> . Overhaul the tools/ makefiles, gluing them to the top level Makefile, from
>   Borislav Petkov.
> 
> . Move the UI files from tools/perf/util/ui/ to tools/perf/ui/. Also move
>   the GTK+ browser to tools/perf/ui/gtk/, from Namhyung Kim.
> 
> . Only fallback to sw cycles counter on ENOENT for the hw cycles, from
>   Robert Richter
> 
> . Trivial fixes from Robert Richter
> 
> . Handle the autogenerated bison/flex files better, from Namhyung and Jiri Olsa.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Borislav Petkov (5):
>       tools: Add Makefile.include
>       tools: Cleanup EXTRA_WARNINGS
>       tools: Add a toplevel Makefile
>       tools: Add a help target
>       tools: Connect to the kernel build system
> 
> Jiri Olsa (1):
>       perf tools: Fix parsers' rules to dependencies
> 
> Namhyung Kim (4):
>       perf tools: Ignore auto-generated bison/flex files
>       perf annotate: Fix a build error
>       perf tools: Move UI bits to tools/perf/ui directory
>       perf tools: Move GTK+ bits to tools/perf/ui/gtk directory
> 
> Robert Richter (3):
>       perf stat: Declare some references static
>       perf tools: Fix thread map that is type pid_t
>       perf record: Use sw counter only if hw pmu is not detected
> 
>  Makefile                                     |    7 ++
>  tools/Makefile                               |   77 ++++++++++++++++++
>  tools/perf/.gitignore                        |    2 +
>  tools/perf/Makefile                          |  110 ++++++++------------------
>  tools/perf/builtin-record.c                  |    2 +-
>  tools/perf/builtin-stat.c                    |   26 +++---
>  tools/perf/{util => }/ui/browser.c           |    0
>  tools/perf/{util => }/ui/browser.h           |    0
>  tools/perf/{util => }/ui/browsers/annotate.c |   10 +--
>  tools/perf/{util => }/ui/browsers/hists.c    |   12 +--
>  tools/perf/{util => }/ui/browsers/map.c      |    6 +-
>  tools/perf/{util => }/ui/browsers/map.h      |    0
>  tools/perf/{util => ui}/gtk/browser.c        |    0
>  tools/perf/{util => ui}/gtk/gtk.h            |    0
>  tools/perf/{util => }/ui/helpline.c          |    0
>  tools/perf/{util => }/ui/helpline.h          |    0
>  tools/perf/{util => }/ui/keysyms.h           |    0
>  tools/perf/{util => }/ui/libslang.h          |    0
>  tools/perf/{util => }/ui/progress.c          |    0
>  tools/perf/{util => }/ui/progress.h          |    0
>  tools/perf/{util => }/ui/setup.c             |    0
>  tools/perf/{util => }/ui/ui.h                |    0
>  tools/perf/{util => }/ui/util.c              |    0
>  tools/perf/{util => }/ui/util.h              |    0
>  tools/perf/util/annotate.c                   |    4 +-
>  tools/perf/util/debug.h                      |    2 +-
>  tools/perf/util/hist.h                       |    2 +-
>  tools/perf/util/thread_map.h                 |    2 +-
>  tools/scripts/Makefile.include               |   57 +++++++++++++
>  29 files changed, 207 insertions(+), 112 deletions(-)
>  create mode 100644 tools/Makefile
>  rename tools/perf/{util => }/ui/browser.c (100%)
>  rename tools/perf/{util => }/ui/browser.h (100%)
>  rename tools/perf/{util => }/ui/browsers/annotate.c (99%)
>  rename tools/perf/{util => }/ui/browsers/hists.c (99%)
>  rename tools/perf/{util => }/ui/browsers/map.c (97%)
>  rename tools/perf/{util => }/ui/browsers/map.h (100%)
>  rename tools/perf/{util => ui}/gtk/browser.c (100%)
>  rename tools/perf/{util => ui}/gtk/gtk.h (100%)
>  rename tools/perf/{util => }/ui/helpline.c (100%)
>  rename tools/perf/{util => }/ui/helpline.h (100%)
>  rename tools/perf/{util => }/ui/keysyms.h (100%)
>  rename tools/perf/{util => }/ui/libslang.h (100%)
>  rename tools/perf/{util => }/ui/progress.c (100%)
>  rename tools/perf/{util => }/ui/progress.h (100%)
>  rename tools/perf/{util => }/ui/setup.c (100%)
>  rename tools/perf/{util => }/ui/ui.h (100%)
>  rename tools/perf/{util => }/ui/util.c (100%)
>  rename tools/perf/{util => }/ui/util.h (100%)
>  create mode 100644 tools/scripts/Makefile.include

Pulled this and the previous bits, thanks Arnaldo!

	Ingo

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

* [GIT PULL 00/13] perf/core fixes and improvements
@ 2012-07-02 20:18 Arnaldo Carvalho de Melo
  2012-07-02 20:18 ` [PATCH 01/13] tools lib traceevent: Fix clean target in Makefile Arnaldo Carvalho de Melo
                   ` (13 more replies)
  0 siblings, 14 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-07-02 20:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Arun Sharma,
	Benjamin Redelings, Corey Ashford, Cyrill Gorcunov, David Ahern,
	Frank Ch. Eigler, Frederic Weisbecker, Hitoshi Mitake, Jiri Olsa,
	Jovi Zhang, Konstantin Stepanyuk, Masami Hiramatsu, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Robert Richter, Stephane Eranian,
	Steven Rostedt, Tom Zanussi, Ulrich Drepper, arnaldo.melo,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit add79461a2a7d964a00b4a2fdaf313c4cf9cf4ec:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2012-06-29 15:11:26 +0200)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo

for you to fetch changes up to 17d7a1123f0f6d532830152564cc812cc73db2f3:

  perf bench: Fix confused variable namings and descriptions in mem subsystem (2012-07-02 14:35:45 -0300)

----------------------------------------------------------------
perf/core improvements and fixes

. Fix libtraceevent 'clean' make target, from Namhyung Kim

. Teach ctags about libtraceevent error codes, from Namhyung Kim

. Fix libtraceevent dependency files usage, from Namhyung Kim

. Support hex number pretty printing in libtraceevent, fixing
  kvm output, from Namhyung Kim

. Kill some die() usage in libtraceevent, from Namhyung Kim

. Improve support for hw breakpoints parsing/pretty printing/testing,
  from Jiri Olsa

. Clarify perf bench option naming, from Hitoshi Mitake

. Look for ".note" ELF notes too, used in the kernel vdso, from Jiri Olsa

. Fix internal PMU list usage, removing leak, from Robert Richter

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Hitoshi Mitake (1):
      perf bench: Fix confused variable namings and descriptions in mem subsystem

Jiri Olsa (4):
      perf tools: Fix hw breakpoint's type modifier parsing
      perf evsel: Handle hw breakpoints event names in perf_evsel__name()
      perf symbols: Add '.note' check into search for NOTE section
      perf tools: Adding round_up/round_down macros

Konstantin Stepanyuk (1):
      tools lib traceevent: Fix clean target in Makefile

Namhyung Kim (6):
      tools lib traceevent: Teach [ce]tags about libtraceeevent error codes
      tools lib traceevent: Make dependency files regeneratable
      tools lib traceevent: Check string is really printable
      tools lib traceevent: Use local variable 'field'
      tools lib traceevent: Add support for __print_hex()
      tools lib traceevent: Replace malloc_or_die to plain malloc in alloc_event()

Robert Richter (1):
      perf tools: Fix generation of pmu list

 tools/lib/traceevent/Makefile                      |   14 ++-
 tools/lib/traceevent/event-parse.c                 |  112 ++++++++++++++++++--
 tools/lib/traceevent/event-parse.h                 |    7 ++
 tools/perf/Documentation/perf-bench.txt            |    4 +-
 tools/perf/bench/mem-memcpy.c                      |   80 +++++++-------
 tools/perf/bench/mem-memset.c                      |   80 +++++++-------
 tools/perf/util/evsel.c                            |   30 ++++++
 tools/perf/util/include/linux/kernel.h             |   10 ++
 tools/perf/util/parse-events-test.c                |   47 ++++++++
 tools/perf/util/parse-events.c                     |   20 ++--
 tools/perf/util/parse-events.l                     |    2 +-
 tools/perf/util/pmu.c                              |    3 +-
 .../perf/util/scripting-engines/trace-event-perl.c |    4 +
 .../util/scripting-engines/trace-event-python.c    |    4 +
 tools/perf/util/symbol.c                           |   29 +++--
 15 files changed, 335 insertions(+), 111 deletions(-)

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

* [PATCH 01/13] tools lib traceevent: Fix clean target in Makefile
  2012-07-02 20:18 [GIT PULL 00/13] perf/core fixes and improvements Arnaldo Carvalho de Melo
@ 2012-07-02 20:18 ` Arnaldo Carvalho de Melo
  2012-07-02 20:18 ` [PATCH 02/13] tools lib traceevent: Teach [ce]tags about libtraceeevent error codes Arnaldo Carvalho de Melo
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-07-02 20:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Konstantin Stepanyuk, Frederic Weisbecker,
	Steven Rostedt, Arnaldo Carvalho de Melo

From: Konstantin Stepanyuk <konstantin.stepanyuk@gmail.com>

Dependency files were not cleaned up. Add missing space to fix the issue.

Signed-off-by: Konstantin Stepanyuk <konstantin.stepanyuk@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1340833934-18783-1-git-send-email-konstantin.stepanyuk@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/traceevent/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index 3d69aa9..423f4b8 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -290,7 +290,7 @@ install_lib: all_cmd install_plugins install_python
 install: install_lib
 
 clean:
-	$(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES).*.d
+	$(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d
 	$(RM) tags TAGS
 
 endif # skip-makefile
-- 
1.7.9.2.358.g22243


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

* [PATCH 02/13] tools lib traceevent: Teach [ce]tags about libtraceeevent error codes
  2012-07-02 20:18 [GIT PULL 00/13] perf/core fixes and improvements Arnaldo Carvalho de Melo
  2012-07-02 20:18 ` [PATCH 01/13] tools lib traceevent: Fix clean target in Makefile Arnaldo Carvalho de Melo
@ 2012-07-02 20:18 ` Arnaldo Carvalho de Melo
  2012-07-02 20:18 ` [PATCH 03/13] tools lib traceevent: Make dependency files regeneratable Arnaldo Carvalho de Melo
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-07-02 20:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, Namhyung Kim, Frederic Weisbecker,
	Peter Zijlstra, Steven Rostedt, Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung.kim@lge.com>

As we use a macro trick to sync each error codes with its description
string, teach [ce]tags to process them properly.

This patch modifies the libtraceevent's Makefile not a kernel one.

Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/tip-3101nsbg52glxdqih291qj74@git.kernel.org
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1340352615-20737-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/traceevent/Makefile |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index 423f4b8..34a577e 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -270,11 +270,13 @@ endif
 
 tags:	force
 	$(RM) tags
-	find . -name '*.[ch]' | xargs ctags --extra=+f --c-kinds=+px
+	find . -name '*.[ch]' | xargs ctags --extra=+f --c-kinds=+px \
+	--regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/'
 
 TAGS:	force
 	$(RM) TAGS
-	find . -name '*.[ch]' | xargs etags
+	find . -name '*.[ch]' | xargs etags \
+	--regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/'
 
 define do_install
 	$(print_install)				\
-- 
1.7.9.2.358.g22243


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

* [PATCH 03/13] tools lib traceevent: Make dependency files regeneratable
  2012-07-02 20:18 [GIT PULL 00/13] perf/core fixes and improvements Arnaldo Carvalho de Melo
  2012-07-02 20:18 ` [PATCH 01/13] tools lib traceevent: Fix clean target in Makefile Arnaldo Carvalho de Melo
  2012-07-02 20:18 ` [PATCH 02/13] tools lib traceevent: Teach [ce]tags about libtraceeevent error codes Arnaldo Carvalho de Melo
@ 2012-07-02 20:18 ` Arnaldo Carvalho de Melo
  2012-07-02 20:18 ` [PATCH 04/13] tools lib traceevent: Check string is really printable Arnaldo Carvalho de Melo
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-07-02 20:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, Namhyung Kim, David Ahern, Jiri Olsa,
	Paul Mackerras, Peter Zijlstra, Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung.kim@lge.com>

Ingo reported that libtraceevent doesn't clean out dependency (.d) files
and it can cause a build error when the libgcc package upgraded:

 comet:~/tip/tools/perf> make -j
     SUBDIR ../lib/traceevent/
 make[1]: *** No rule to make target `/usr/lib/gcc/x86_64-redhat-linux/4.7.0/include/stddef.h',
  needed by `event-parse.o'.  Stop.
 make: *** [../lib/traceevent//libtraceevent.a] Error 2

So this patch makes the .d files depends on the source and header files
also, so that it can be re-generated as needed.

NOTE: This code is copied from the GNU make manual page
(4.14 Generating Prerequisites Automatically).

Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1340343462-15556-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/traceevent/Makefile |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index 34a577e..46c2f6b 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -250,8 +250,12 @@ endef
 all_objs := $(sort $(ALL_OBJS))
 all_deps := $(all_objs:%.o=.%.d)
 
+# let .d file also depends on the source and header files
 define check_deps
-		$(CC) -M $(CFLAGS) $< > $@;
+		@set -e; $(RM) $@; \
+		$(CC) -M $(CFLAGS) $< > $@.$$$$; \
+		sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
+		$(RM) $@.$$$$
 endef
 
 $(gui_deps): ks_version.h
-- 
1.7.9.2.358.g22243


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

* [PATCH 04/13] tools lib traceevent: Check string is really printable
  2012-07-02 20:18 [GIT PULL 00/13] perf/core fixes and improvements Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2012-07-02 20:18 ` [PATCH 03/13] tools lib traceevent: Make dependency files regeneratable Arnaldo Carvalho de Melo
@ 2012-07-02 20:18 ` Arnaldo Carvalho de Melo
  2012-07-02 20:18 ` [PATCH 05/13] tools lib traceevent: Use local variable 'field' Arnaldo Carvalho de Melo
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-07-02 20:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, Namhyung Kim, Frederic Weisbecker,
	Peter Zijlstra, Steven Rostedt, Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung.kim@lge.com>

When libtraceevent parses format fields, it assumes that array of 1 byte
is string but it's not always true. The kvm_emulate_insn contains 15 u8
array of insn that contains (binary) instructions. Thus when it's
printed, it'll have broken output like below:

  kvm_emulate_insn:     [FAILED TO PARSE] rip=3238197797 csbase=0 len=2 \
  insn=<89>P^]<B4>& flags=5 failed=0

With this patch:

  kvm_emulate_insn:     [FAILED TO PARSE] rip=3238197797 csbase=0 len=2 \
  insn=ARRAY[89, 10, 5d, c3, 8d, b4, 26, 00, 00, 00, 00, 55, 89, e5, 3e] flags=5 failed=0

Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1340352615-20737-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/traceevent/event-parse.c |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 5548282..b203a50 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -3589,6 +3589,16 @@ static void print_mac_arg(struct trace_seq *s, int mac, void *data, int size,
 	trace_seq_printf(s, fmt, buf[0], buf[1], buf[2], buf[3], buf[4], buf[5]);
 }
 
+static int is_printable_array(char *p, unsigned int len)
+{
+	unsigned int i;
+
+	for (i = 0; i < len && p[i]; i++)
+		if (!isprint(p[i]))
+		    return 0;
+	return 1;
+}
+
 static void print_event_fields(struct trace_seq *s, void *data, int size,
 			       struct event_format *event)
 {
@@ -3608,7 +3618,8 @@ static void print_event_fields(struct trace_seq *s, void *data, int size,
 				len = offset >> 16;
 				offset &= 0xffff;
 			}
-			if (field->flags & FIELD_IS_STRING) {
+			if (field->flags & FIELD_IS_STRING &&
+			    is_printable_array(data + offset, len)) {
 				trace_seq_printf(s, "%s", (char *)data + offset);
 			} else {
 				trace_seq_puts(s, "ARRAY[");
@@ -3619,6 +3630,7 @@ static void print_event_fields(struct trace_seq *s, void *data, int size,
 							 *((unsigned char *)data + offset + i));
 				}
 				trace_seq_putc(s, ']');
+				field->flags &= ~FIELD_IS_STRING;
 			}
 		} else {
 			val = pevent_read_number(event->pevent, data + field->offset,
-- 
1.7.9.2.358.g22243


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

* [PATCH 05/13] tools lib traceevent: Use local variable 'field'
  2012-07-02 20:18 [GIT PULL 00/13] perf/core fixes and improvements Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2012-07-02 20:18 ` [PATCH 04/13] tools lib traceevent: Check string is really printable Arnaldo Carvalho de Melo
@ 2012-07-02 20:18 ` Arnaldo Carvalho de Melo
  2012-07-02 20:18 ` [PATCH 06/13] tools lib traceevent: Add support for __print_hex() Arnaldo Carvalho de Melo
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-07-02 20:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, Namhyung Kim, Frederic Weisbecker,
	Peter Zijlstra, Steven Rostedt, Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung.kim@lge.com>

Use local variable 'field' to reduce typing. It is needed by later patch
not to exceed 80 column.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1340757701-10711-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/traceevent/event-parse.c |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index b203a50..63d02be 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -3214,6 +3214,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
 {
 	struct pevent *pevent = event->pevent;
 	struct print_flag_sym *flag;
+	struct format_field *field;
 	unsigned long long val, fval;
 	unsigned long addr;
 	char *str;
@@ -3228,27 +3229,29 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
 		print_str_to_seq(s, format, len_arg, arg->atom.atom);
 		return;
 	case PRINT_FIELD:
-		if (!arg->field.field) {
-			arg->field.field = pevent_find_any_field(event, arg->field.name);
-			if (!arg->field.field)
+		field = arg->field.field;
+		if (!field) {
+			field = pevent_find_any_field(event, arg->field.name);
+			if (!field)
 				die("field %s not found", arg->field.name);
+			arg->field.field = field;
 		}
 		/* Zero sized fields, mean the rest of the data */
-		len = arg->field.field->size ? : size - arg->field.field->offset;
+		len = field->size ? : size - field->offset;
 
 		/*
 		 * Some events pass in pointers. If this is not an array
 		 * and the size is the same as long_size, assume that it
 		 * is a pointer.
 		 */
-		if (!(arg->field.field->flags & FIELD_IS_ARRAY) &&
-		    arg->field.field->size == pevent->long_size) {
-			addr = *(unsigned long *)(data + arg->field.field->offset);
+		if (!(field->flags & FIELD_IS_ARRAY) &&
+		    field->size == pevent->long_size) {
+			addr = *(unsigned long *)(data + field->offset);
 			trace_seq_printf(s, "%lx", addr);
 			break;
 		}
 		str = malloc_or_die(len + 1);
-		memcpy(str, data + arg->field.field->offset, len);
+		memcpy(str, data + field->offset, len);
 		str[len] = 0;
 		print_str_to_seq(s, format, len_arg, str);
 		free(str);
-- 
1.7.9.2.358.g22243


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

* [PATCH 06/13] tools lib traceevent: Add support for __print_hex()
  2012-07-02 20:18 [GIT PULL 00/13] perf/core fixes and improvements Arnaldo Carvalho de Melo
                   ` (4 preceding siblings ...)
  2012-07-02 20:18 ` [PATCH 05/13] tools lib traceevent: Use local variable 'field' Arnaldo Carvalho de Melo
@ 2012-07-02 20:18 ` Arnaldo Carvalho de Melo
  2012-07-02 20:18 ` [PATCH 07/13] tools lib traceevent: Replace malloc_or_die to plain malloc in alloc_event() Arnaldo Carvalho de Melo
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-07-02 20:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, Namhyung Kim, Frederic Weisbecker,
	Peter Zijlstra, Steven Rostedt, Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung.kim@lge.com>

Since the __print_hex() function is used in print fmt now, add
corresponding parser routines. This makes the output of perf script on
the kvm_emulate_insn event not to fail any more.

 before:
      kvm_emulate_insn:     [FAILED TO PARSE] rip=3238197797 ...

 after:
      kvm_emulate_insn:     0:c102fa25:89 10 (prot32)

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1340757701-10711-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/traceevent/event-parse.c                 |   75 +++++++++++++++++++-
 tools/lib/traceevent/event-parse.h                 |    7 ++
 .../perf/util/scripting-engines/trace-event-perl.c |    4 ++
 .../util/scripting-engines/trace-event-python.c    |    4 ++
 4 files changed, 89 insertions(+), 1 deletion(-)

diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 63d02be..b1abd39 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -697,6 +697,10 @@ static void free_arg(struct print_arg *arg)
 		free_arg(arg->symbol.field);
 		free_flag_sym(arg->symbol.symbols);
 		break;
+	case PRINT_HEX:
+		free_arg(arg->hex.field);
+		free_arg(arg->hex.size);
+		break;
 	case PRINT_TYPE:
 		free(arg->typecast.type);
 		free_arg(arg->typecast.item);
@@ -2260,6 +2264,45 @@ process_symbols(struct event_format *event, struct print_arg *arg, char **tok)
 }
 
 static enum event_type
+process_hex(struct event_format *event, struct print_arg *arg, char **tok)
+{
+	struct print_arg *field;
+	enum event_type type;
+	char *token;
+
+	memset(arg, 0, sizeof(*arg));
+	arg->type = PRINT_HEX;
+
+	field = alloc_arg();
+	type = process_arg(event, field, &token);
+
+	if (test_type_token(type, token, EVENT_DELIM, ","))
+		goto out_free;
+
+	arg->hex.field = field;
+
+	free_token(token);
+
+	field = alloc_arg();
+	type = process_arg(event, field, &token);
+
+	if (test_type_token(type, token, EVENT_DELIM, ")"))
+		goto out_free;
+
+	arg->hex.size = field;
+
+	free_token(token);
+	type = read_token_item(tok);
+	return type;
+
+ out_free:
+	free_arg(field);
+	free_token(token);
+	*tok = NULL;
+	return EVENT_ERROR;
+}
+
+static enum event_type
 process_dynamic_array(struct event_format *event, struct print_arg *arg, char **tok)
 {
 	struct format_field *field;
@@ -2488,6 +2531,10 @@ process_function(struct event_format *event, struct print_arg *arg,
 		is_symbolic_field = 1;
 		return process_symbols(event, arg, tok);
 	}
+	if (strcmp(token, "__print_hex") == 0) {
+		free_token(token);
+		return process_hex(event, arg, tok);
+	}
 	if (strcmp(token, "__get_str") == 0) {
 		free_token(token);
 		return process_str(event, arg, tok);
@@ -2995,6 +3042,7 @@ eval_num_arg(void *data, int size, struct event_format *event, struct print_arg
 		break;
 	case PRINT_FLAGS:
 	case PRINT_SYMBOL:
+	case PRINT_HEX:
 		break;
 	case PRINT_TYPE:
 		val = eval_num_arg(data, size, event, arg->typecast.item);
@@ -3218,8 +3266,9 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
 	unsigned long long val, fval;
 	unsigned long addr;
 	char *str;
+	unsigned char *hex;
 	int print;
-	int len;
+	int i, len;
 
 	switch (arg->type) {
 	case PRINT_NULL:
@@ -3284,6 +3333,23 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
 			}
 		}
 		break;
+	case PRINT_HEX:
+		field = arg->hex.field->field.field;
+		if (!field) {
+			str = arg->hex.field->field.name;
+			field = pevent_find_any_field(event, str);
+			if (!field)
+				die("field %s not found", str);
+			arg->hex.field->field.field = field;
+		}
+		hex = data + field->offset;
+		len = eval_num_arg(data, size, event, arg->hex.size);
+		for (i = 0; i < len; i++) {
+			if (i)
+				trace_seq_putc(s, ' ');
+			trace_seq_printf(s, "%02x", hex[i]);
+		}
+		break;
 
 	case PRINT_TYPE:
 		break;
@@ -4294,6 +4360,13 @@ static void print_args(struct print_arg *args)
 		trace_seq_destroy(&s);
 		printf(")");
 		break;
+	case PRINT_HEX:
+		printf("__print_hex(");
+		print_args(args->hex.field);
+		printf(", ");
+		print_args(args->hex.size);
+		printf(")");
+		break;
 	case PRINT_STRING:
 	case PRINT_BSTRING:
 		printf("__get_str(%s)", args->string.string);
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index ac997bc..5772ad8 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -226,6 +226,11 @@ struct print_arg_symbol {
 	struct print_flag_sym	*symbols;
 };
 
+struct print_arg_hex {
+	struct print_arg	*field;
+	struct print_arg	*size;
+};
+
 struct print_arg_dynarray {
 	struct format_field	*field;
 	struct print_arg	*index;
@@ -253,6 +258,7 @@ enum print_arg_type {
 	PRINT_FIELD,
 	PRINT_FLAGS,
 	PRINT_SYMBOL,
+	PRINT_HEX,
 	PRINT_TYPE,
 	PRINT_STRING,
 	PRINT_BSTRING,
@@ -270,6 +276,7 @@ struct print_arg {
 		struct print_arg_typecast	typecast;
 		struct print_arg_flags		flags;
 		struct print_arg_symbol		symbol;
+		struct print_arg_hex		hex;
 		struct print_arg_func		func;
 		struct print_arg_string		string;
 		struct print_arg_op		op;
diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c
index b3620fe..02dfa19 100644
--- a/tools/perf/util/scripting-engines/trace-event-perl.c
+++ b/tools/perf/util/scripting-engines/trace-event-perl.c
@@ -209,6 +209,10 @@ static void define_event_symbols(struct event_format *event,
 		define_symbolic_values(args->symbol.symbols, ev_name,
 				       cur_field_name);
 		break;
+	case PRINT_HEX:
+		define_event_symbols(event, ev_name, args->hex.field);
+		define_event_symbols(event, ev_name, args->hex.size);
+		break;
 	case PRINT_BSTRING:
 	case PRINT_DYNAMIC_ARRAY:
 	case PRINT_STRING:
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index a8ca2f8..ce4d1b0 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -166,6 +166,10 @@ static void define_event_symbols(struct event_format *event,
 		define_values(PRINT_SYMBOL, args->symbol.symbols, ev_name,
 			      cur_field_name);
 		break;
+	case PRINT_HEX:
+		define_event_symbols(event, ev_name, args->hex.field);
+		define_event_symbols(event, ev_name, args->hex.size);
+		break;
 	case PRINT_STRING:
 		break;
 	case PRINT_TYPE:
-- 
1.7.9.2.358.g22243


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

* [PATCH 07/13] tools lib traceevent: Replace malloc_or_die to plain malloc in alloc_event()
  2012-07-02 20:18 [GIT PULL 00/13] perf/core fixes and improvements Arnaldo Carvalho de Melo
                   ` (5 preceding siblings ...)
  2012-07-02 20:18 ` [PATCH 06/13] tools lib traceevent: Add support for __print_hex() Arnaldo Carvalho de Melo
@ 2012-07-02 20:18 ` Arnaldo Carvalho de Melo
  2012-07-02 20:18 ` [PATCH 08/13] perf tools: Fix hw breakpoint's type modifier parsing Arnaldo Carvalho de Melo
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-07-02 20:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, Namhyung Kim, Frederic Weisbecker,
	Paul Mackerras, Peter Zijlstra, Steven Rostedt,
	Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung.kim@lge.com>

Because the only caller of the alloc_event() (pevent_parse_event) checks
return value properly, it can be changed to use plain malloc.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1339396133-9839-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/traceevent/event-parse.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index b1abd39..83f0a8a 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -616,7 +616,9 @@ static struct event_format *alloc_event(void)
 {
 	struct event_format *event;
 
-	event = malloc_or_die(sizeof(*event));
+	event = malloc(sizeof(*event));
+	if (!event)
+		return NULL;
 	memset(event, 0, sizeof(*event));
 
 	return event;
-- 
1.7.9.2.358.g22243


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

* [PATCH 08/13] perf tools: Fix hw breakpoint's type modifier parsing
  2012-07-02 20:18 [GIT PULL 00/13] perf/core fixes and improvements Arnaldo Carvalho de Melo
                   ` (6 preceding siblings ...)
  2012-07-02 20:18 ` [PATCH 07/13] tools lib traceevent: Replace malloc_or_die to plain malloc in alloc_event() Arnaldo Carvalho de Melo
@ 2012-07-02 20:18 ` Arnaldo Carvalho de Melo
  2012-07-02 20:18 ` [PATCH 09/13] perf evsel: Handle hw breakpoints event names in perf_evsel__name() Arnaldo Carvalho de Melo
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-07-02 20:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Jovi Zhang, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@redhat.com>

Fixing the hw breakpoint's type modifier parsing to allow all possible
combinations of 'rwx' characters.

Adding automated tests to the parsing test suite.

Reported-by: Jovi Zhang <bookjovi@gmail.com>
Original-patch-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Jovi Zhang <bookjovi@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20120629072254.GA940@krava.brq.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/parse-events-test.c |   37 +++++++++++++++++++++++++++++++++++
 tools/perf/util/parse-events.c      |   16 ++++++++++++---
 tools/perf/util/parse-events.l      |    2 +-
 3 files changed, 51 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/parse-events-test.c b/tools/perf/util/parse-events-test.c
index a0f61a2..de81fe1 100644
--- a/tools/perf/util/parse-events-test.c
+++ b/tools/perf/util/parse-events-test.c
@@ -181,6 +181,22 @@ static int test__checkevent_breakpoint_w(struct perf_evlist *evlist)
 	return 0;
 }
 
+static int test__checkevent_breakpoint_rw(struct perf_evlist *evlist)
+{
+	struct perf_evsel *evsel = list_entry(evlist->entries.next,
+					      struct perf_evsel, node);
+
+	TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->nr_entries);
+	TEST_ASSERT_VAL("wrong type",
+			PERF_TYPE_BREAKPOINT == evsel->attr.type);
+	TEST_ASSERT_VAL("wrong config", 0 == evsel->attr.config);
+	TEST_ASSERT_VAL("wrong bp_type",
+		(HW_BREAKPOINT_R|HW_BREAKPOINT_W) == evsel->attr.bp_type);
+	TEST_ASSERT_VAL("wrong bp_len",
+			HW_BREAKPOINT_LEN_4 == evsel->attr.bp_len);
+	return 0;
+}
+
 static int test__checkevent_tracepoint_modifier(struct perf_evlist *evlist)
 {
 	struct perf_evsel *evsel = list_entry(evlist->entries.next,
@@ -352,6 +368,19 @@ static int test__checkevent_breakpoint_w_modifier(struct perf_evlist *evlist)
 	return test__checkevent_breakpoint_w(evlist);
 }
 
+static int test__checkevent_breakpoint_rw_modifier(struct perf_evlist *evlist)
+{
+	struct perf_evsel *evsel = list_entry(evlist->entries.next,
+					      struct perf_evsel, node);
+
+	TEST_ASSERT_VAL("wrong exclude_user", evsel->attr.exclude_user);
+	TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->attr.exclude_kernel);
+	TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv);
+	TEST_ASSERT_VAL("wrong precise_ip", evsel->attr.precise_ip);
+
+	return test__checkevent_breakpoint_rw(evlist);
+}
+
 static int test__checkevent_pmu(struct perf_evlist *evlist)
 {
 
@@ -585,6 +614,14 @@ static struct test__event_st test__events[] = {
 		.name  = "instructions:H",
 		.check = test__checkevent_exclude_guest_modifier,
 	},
+	[26] = {
+		.name  = "mem:0:rw",
+		.check = test__checkevent_breakpoint_rw,
+	},
+	[27] = {
+		.name  = "mem:0:rw:kp",
+		.check = test__checkevent_breakpoint_rw_modifier,
+	},
 };
 
 #define TEST__EVENTS_CNT (sizeof(test__events) / sizeof(struct test__event_st))
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 0cc27da..7ae76af 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -383,21 +383,31 @@ parse_breakpoint_type(const char *type, struct perf_event_attr *attr)
 		if (!type || !type[i])
 			break;
 
+#define CHECK_SET_TYPE(bit)		\
+do {					\
+	if (attr->bp_type & bit)	\
+		return -EINVAL;		\
+	else				\
+		attr->bp_type |= bit;	\
+} while (0)
+
 		switch (type[i]) {
 		case 'r':
-			attr->bp_type |= HW_BREAKPOINT_R;
+			CHECK_SET_TYPE(HW_BREAKPOINT_R);
 			break;
 		case 'w':
-			attr->bp_type |= HW_BREAKPOINT_W;
+			CHECK_SET_TYPE(HW_BREAKPOINT_W);
 			break;
 		case 'x':
-			attr->bp_type |= HW_BREAKPOINT_X;
+			CHECK_SET_TYPE(HW_BREAKPOINT_X);
 			break;
 		default:
 			return -EINVAL;
 		}
 	}
 
+#undef CHECK_SET_TYPE
+
 	if (!attr->bp_type) /* Default */
 		attr->bp_type = HW_BREAKPOINT_R | HW_BREAKPOINT_W;
 
diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
index 488362e..a066894 100644
--- a/tools/perf/util/parse-events.l
+++ b/tools/perf/util/parse-events.l
@@ -76,7 +76,7 @@ num_hex		0x[a-fA-F0-9]+
 num_raw_hex	[a-fA-F0-9]+
 name		[a-zA-Z_*?][a-zA-Z0-9_*?]*
 modifier_event	[ukhpGH]{1,8}
-modifier_bp	[rwx]
+modifier_bp	[rwx]{1,3}
 
 %%
 
-- 
1.7.9.2.358.g22243


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

* [PATCH 09/13] perf evsel: Handle hw breakpoints event names in perf_evsel__name()
  2012-07-02 20:18 [GIT PULL 00/13] perf/core fixes and improvements Arnaldo Carvalho de Melo
                   ` (7 preceding siblings ...)
  2012-07-02 20:18 ` [PATCH 08/13] perf tools: Fix hw breakpoint's type modifier parsing Arnaldo Carvalho de Melo
@ 2012-07-02 20:18 ` Arnaldo Carvalho de Melo
  2012-07-02 20:18 ` [PATCH 10/13] perf tools: Fix generation of pmu list Arnaldo Carvalho de Melo
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-07-02 20:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Jovi Zhang, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@redhat.com>

Adding hw breakpoint events hook in the perf_evsel__name function, to
display event names properly all over the perf tools.

Updated hw breakpoints events tests.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Jovi Zhang <bookjovi@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1340918329-3012-3-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/evsel.c             |   30 ++++++++++++++++++++++++++++++
 tools/perf/util/parse-events-test.c |   10 ++++++++++
 tools/perf/util/parse-events.c      |    4 +---
 3 files changed, 41 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 3d1f696..e817713 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -15,6 +15,7 @@
 #include "cpumap.h"
 #include "thread_map.h"
 #include "target.h"
+#include "../../../include/linux/hw_breakpoint.h"
 
 #define FD(e, x, y) (*(int *)xyarray__entry(e->fd, x, y))
 #define GROUP_FD(group_fd, cpu) (*(int *)xyarray__entry(group_fd, cpu, 0))
@@ -152,6 +153,31 @@ static int perf_evsel__sw_name(struct perf_evsel *evsel, char *bf, size_t size)
 	return r + perf_evsel__add_modifiers(evsel, bf + r, size - r);
 }
 
+static int __perf_evsel__bp_name(char *bf, size_t size, u64 addr, u64 type)
+{
+	int r;
+
+	r = scnprintf(bf, size, "mem:0x%" PRIx64 ":", addr);
+
+	if (type & HW_BREAKPOINT_R)
+		r += scnprintf(bf + r, size - r, "r");
+
+	if (type & HW_BREAKPOINT_W)
+		r += scnprintf(bf + r, size - r, "w");
+
+	if (type & HW_BREAKPOINT_X)
+		r += scnprintf(bf + r, size - r, "x");
+
+	return r;
+}
+
+static int perf_evsel__bp_name(struct perf_evsel *evsel, char *bf, size_t size)
+{
+	struct perf_event_attr *attr = &evsel->attr;
+	int r = __perf_evsel__bp_name(bf, size, attr->bp_addr, attr->bp_type);
+	return r + perf_evsel__add_modifiers(evsel, bf + r, size - r);
+}
+
 const char *perf_evsel__hw_cache[PERF_COUNT_HW_CACHE_MAX]
 				[PERF_EVSEL__MAX_ALIASES] = {
  { "L1-dcache",	"l1-d",		"l1d",		"L1-data",		},
@@ -285,6 +311,10 @@ const char *perf_evsel__name(struct perf_evsel *evsel)
 		scnprintf(bf, sizeof(bf), "%s", "unknown tracepoint");
 		break;
 
+	case PERF_TYPE_BREAKPOINT:
+		perf_evsel__bp_name(evsel, bf, sizeof(bf));
+		break;
+
 	default:
 		scnprintf(bf, sizeof(bf), "%s", "unknown attr type");
 		break;
diff --git a/tools/perf/util/parse-events-test.c b/tools/perf/util/parse-events-test.c
index de81fe1..dd0c306 100644
--- a/tools/perf/util/parse-events-test.c
+++ b/tools/perf/util/parse-events-test.c
@@ -325,6 +325,8 @@ static int test__checkevent_breakpoint_modifier(struct perf_evlist *evlist)
 	TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel);
 	TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv);
 	TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip);
+	TEST_ASSERT_VAL("wrong name",
+			!strcmp(perf_evsel__name(evsel), "mem:0x0:rw:u"));
 
 	return test__checkevent_breakpoint(evlist);
 }
@@ -338,6 +340,8 @@ static int test__checkevent_breakpoint_x_modifier(struct perf_evlist *evlist)
 	TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->attr.exclude_kernel);
 	TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv);
 	TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip);
+	TEST_ASSERT_VAL("wrong name",
+			!strcmp(perf_evsel__name(evsel), "mem:0x0:x:k"));
 
 	return test__checkevent_breakpoint_x(evlist);
 }
@@ -351,6 +355,8 @@ static int test__checkevent_breakpoint_r_modifier(struct perf_evlist *evlist)
 	TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel);
 	TEST_ASSERT_VAL("wrong exclude_hv", !evsel->attr.exclude_hv);
 	TEST_ASSERT_VAL("wrong precise_ip", evsel->attr.precise_ip);
+	TEST_ASSERT_VAL("wrong name",
+			!strcmp(perf_evsel__name(evsel), "mem:0x0:r:hp"));
 
 	return test__checkevent_breakpoint_r(evlist);
 }
@@ -364,6 +370,8 @@ static int test__checkevent_breakpoint_w_modifier(struct perf_evlist *evlist)
 	TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel);
 	TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv);
 	TEST_ASSERT_VAL("wrong precise_ip", evsel->attr.precise_ip);
+	TEST_ASSERT_VAL("wrong name",
+			!strcmp(perf_evsel__name(evsel), "mem:0x0:w:up"));
 
 	return test__checkevent_breakpoint_w(evlist);
 }
@@ -377,6 +385,8 @@ static int test__checkevent_breakpoint_rw_modifier(struct perf_evlist *evlist)
 	TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->attr.exclude_kernel);
 	TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv);
 	TEST_ASSERT_VAL("wrong precise_ip", evsel->attr.precise_ip);
+	TEST_ASSERT_VAL("wrong name",
+			!strcmp(perf_evsel__name(evsel), "mem:0x0:rw:kp"));
 
 	return test__checkevent_breakpoint_rw(evlist);
 }
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 7ae76af..1dc44dc 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -418,7 +418,6 @@ int parse_events_add_breakpoint(struct list_head **list, int *idx,
 				void *ptr, char *type)
 {
 	struct perf_event_attr attr;
-	char name[MAX_NAME_LEN];
 
 	memset(&attr, 0, sizeof(attr));
 	attr.bp_addr = (unsigned long) ptr;
@@ -437,8 +436,7 @@ int parse_events_add_breakpoint(struct list_head **list, int *idx,
 
 	attr.type = PERF_TYPE_BREAKPOINT;
 
-	snprintf(name, MAX_NAME_LEN, "mem:%p:%s", ptr, type ? type : "rw");
-	return add_event(list, idx, &attr, name);
+	return add_event(list, idx, &attr, NULL);
 }
 
 static int config_term(struct perf_event_attr *attr,
-- 
1.7.9.2.358.g22243


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

* [PATCH 10/13] perf tools: Fix generation of pmu list
  2012-07-02 20:18 [GIT PULL 00/13] perf/core fixes and improvements Arnaldo Carvalho de Melo
                   ` (8 preceding siblings ...)
  2012-07-02 20:18 ` [PATCH 09/13] perf evsel: Handle hw breakpoints event names in perf_evsel__name() Arnaldo Carvalho de Melo
@ 2012-07-02 20:18 ` Arnaldo Carvalho de Melo
  2012-07-02 20:18 ` [PATCH 11/13] perf symbols: Add '.note' check into search for NOTE section Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-07-02 20:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Robert Richter, Corey Ashford, Frederic Weisbecker,
	Ingo Molnar, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Arnaldo Carvalho de Melo

From: Robert Richter <robert.richter@amd.com>

The internal pmu list was never used. With each perf_pmu__find() call
the pmu structure was created new by parsing sysfs. Beside this it
caused memory leaks. We now keep all pmus by adding them to the list.

Also, pmu_lookup() should return pmus that do not expose the format
specifier in sysfs.

We need a valid internal pmu list in a later patch to iterate over all
pmus that exist in the system.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1339706321-8802-3-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/pmu.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 74d0948e..67715a4 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -72,7 +72,7 @@ static int pmu_format(char *name, struct list_head *format)
 		 "%s/bus/event_source/devices/%s/format", sysfs, name);
 
 	if (stat(path, &st) < 0)
-		return -1;
+		return 0;	/* no error if format does not exist */
 
 	if (pmu_format_parse(path, format))
 		return -1;
@@ -252,6 +252,7 @@ static struct perf_pmu *pmu_lookup(char *name)
 	list_splice(&aliases, &pmu->aliases);
 	pmu->name = strdup(name);
 	pmu->type = type;
+	list_add_tail(&pmu->list, &pmus);
 	return pmu;
 }
 
-- 
1.7.9.2.358.g22243


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

* [PATCH 11/13] perf symbols: Add '.note' check into search for NOTE section
  2012-07-02 20:18 [GIT PULL 00/13] perf/core fixes and improvements Arnaldo Carvalho de Melo
                   ` (9 preceding siblings ...)
  2012-07-02 20:18 ` [PATCH 10/13] perf tools: Fix generation of pmu list Arnaldo Carvalho de Melo
@ 2012-07-02 20:18 ` Arnaldo Carvalho de Melo
  2012-07-02 20:18 ` [PATCH 12/13] perf tools: Adding round_up/round_down macros Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-07-02 20:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Arun Sharma, Benjamin Redelings,
	Corey Ashford, Cyrill Gorcunov, Frank Ch. Eigler,
	Frederic Weisbecker, Masami Hiramatsu, Paul Mackerras,
	Peter Zijlstra, Robert Richter, Stephane Eranian, Tom Zanussi,
	Ulrich Drepper, Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@redhat.com>

Adding '.note' section name to be check when looking for notes section.
The '.note' name is used by kernel VDSO.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Arun Sharma <asharma@fb.com>
Cc: Benjamin Redelings <benjamin.redelings@nescent.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Frank Ch. Eigler <fche@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Ulrich Drepper <drepper@gmail.com>
Link: http://lkml.kernel.org/r/1340120894-9465-15-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/symbol.c |   29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 994f4ff..50958bb 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1478,14 +1478,31 @@ static int elf_read_build_id(Elf *elf, void *bf, size_t size)
 		goto out;
 	}
 
-	sec = elf_section_by_name(elf, &ehdr, &shdr,
-				  ".note.gnu.build-id", NULL);
-	if (sec == NULL) {
+	/*
+	 * Check following sections for notes:
+	 *   '.note.gnu.build-id'
+	 *   '.notes'
+	 *   '.note' (VDSO specific)
+	 */
+	do {
+		sec = elf_section_by_name(elf, &ehdr, &shdr,
+					  ".note.gnu.build-id", NULL);
+		if (sec)
+			break;
+
 		sec = elf_section_by_name(elf, &ehdr, &shdr,
 					  ".notes", NULL);
-		if (sec == NULL)
-			goto out;
-	}
+		if (sec)
+			break;
+
+		sec = elf_section_by_name(elf, &ehdr, &shdr,
+					  ".note", NULL);
+		if (sec)
+			break;
+
+		return err;
+
+	} while (0);
 
 	data = elf_getdata(sec, NULL);
 	if (data == NULL)
-- 
1.7.9.2.358.g22243


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

* [PATCH 12/13] perf tools: Adding round_up/round_down macros
  2012-07-02 20:18 [GIT PULL 00/13] perf/core fixes and improvements Arnaldo Carvalho de Melo
                   ` (10 preceding siblings ...)
  2012-07-02 20:18 ` [PATCH 11/13] perf symbols: Add '.note' check into search for NOTE section Arnaldo Carvalho de Melo
@ 2012-07-02 20:18 ` Arnaldo Carvalho de Melo
  2012-07-02 20:18 ` [PATCH 13/13] perf bench: Fix confused variable namings and descriptions in mem subsystem Arnaldo Carvalho de Melo
  2012-07-06  8:24 ` [GIT PULL 00/13] perf/core fixes and improvements Ingo Molnar
  13 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-07-02 20:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Arun Sharma, Benjamin Redelings,
	Corey Ashford, Cyrill Gorcunov, Frank Ch. Eigler,
	Frederic Weisbecker, Masami Hiramatsu, Paul Mackerras,
	Peter Zijlstra, Robert Richter, Stephane Eranian, Tom Zanussi,
	Ulrich Drepper, Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@redhat.com>

Adding round_up and round_down macros. They will be used in upcoming
patches.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Arun Sharma <asharma@fb.com>
Cc: Benjamin Redelings <benjamin.redelings@nescent.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Frank Ch. Eigler <fche@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Ulrich Drepper <drepper@gmail.com>
Link: http://lkml.kernel.org/r/1340120894-9465-21-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/include/linux/kernel.h |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/perf/util/include/linux/kernel.h b/tools/perf/util/include/linux/kernel.h
index 1eb804f..b6842c1 100644
--- a/tools/perf/util/include/linux/kernel.h
+++ b/tools/perf/util/include/linux/kernel.h
@@ -108,4 +108,14 @@ int eprintf(int level,
 #define pr_debug3(fmt, ...) pr_debugN(3, pr_fmt(fmt), ##__VA_ARGS__)
 #define pr_debug4(fmt, ...) pr_debugN(4, pr_fmt(fmt), ##__VA_ARGS__)
 
+/*
+ * This looks more complex than it should be. But we need to
+ * get the type for the ~ right in round_down (it needs to be
+ * as wide as the result!), and we want to evaluate the macro
+ * arguments just once each.
+ */
+#define __round_mask(x, y) ((__typeof__(x))((y)-1))
+#define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
+#define round_down(x, y) ((x) & ~__round_mask(x, y))
+
 #endif
-- 
1.7.9.2.358.g22243


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

* [PATCH 13/13] perf bench: Fix confused variable namings and descriptions in mem subsystem
  2012-07-02 20:18 [GIT PULL 00/13] perf/core fixes and improvements Arnaldo Carvalho de Melo
                   ` (11 preceding siblings ...)
  2012-07-02 20:18 ` [PATCH 12/13] perf tools: Adding round_up/round_down macros Arnaldo Carvalho de Melo
@ 2012-07-02 20:18 ` Arnaldo Carvalho de Melo
  2012-07-06  8:24 ` [GIT PULL 00/13] perf/core fixes and improvements Ingo Molnar
  13 siblings, 0 replies; 18+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-07-02 20:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Hitoshi Mitake, Namhyung Kim,
	Arnaldo Carvalho de Melo

From: Hitoshi Mitake <h.mitake@gmail.com>

As Namhyung Kim pointed, there are confused namings and descriptions of words
"cycle" and "clock" in mem-memset.c and mem-memcpy.c.

With the option "-c" (or "--clock", now renamed as "--cycle"), mem subsystem
measures cost of memset() and memcpy() with cpu-cycles event.

But current mem subsystem source code contains lots of confused variable
namings and descriptions with "clock" (e.g. the variable use_clock). This is a
very bad style because there is another software event named "cpu-clock". This
patch replaces wrong usage of "clock" to "cycle".

v2: modified Documentation/perf-bench.txt for the descriptions of
--cycle option

Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1341236777-18457-1-git-send-email-h.mitake@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-bench.txt |    4 +-
 tools/perf/bench/mem-memcpy.c           |   80 +++++++++++++++----------------
 tools/perf/bench/mem-memset.c           |   80 +++++++++++++++----------------
 3 files changed, 82 insertions(+), 82 deletions(-)

diff --git a/tools/perf/Documentation/perf-bench.txt b/tools/perf/Documentation/perf-bench.txt
index f3c716a..7065cd6 100644
--- a/tools/perf/Documentation/perf-bench.txt
+++ b/tools/perf/Documentation/perf-bench.txt
@@ -144,7 +144,7 @@ On x86-64, x86-64-unrolled, x86-64-movsq and x86-64-movsb are supported.
 Repeat memcpy invocation this number of times.
 
 -c::
---clock::
+--cycle::
 Use perf's cpu-cycles event instead of gettimeofday syscall.
 
 -o::
@@ -176,7 +176,7 @@ On x86-64, x86-64-unrolled, x86-64-stosq and x86-64-stosb are supported.
 Repeat memset invocation this number of times.
 
 -c::
---clock::
+--cycle::
 Use perf's cpu-cycles event instead of gettimeofday syscall.
 
 -o::
diff --git a/tools/perf/bench/mem-memcpy.c b/tools/perf/bench/mem-memcpy.c
index d990365..02dad5d 100644
--- a/tools/perf/bench/mem-memcpy.c
+++ b/tools/perf/bench/mem-memcpy.c
@@ -24,8 +24,8 @@
 static const char	*length_str	= "1MB";
 static const char	*routine	= "default";
 static int		iterations	= 1;
-static bool		use_clock;
-static int		clock_fd;
+static bool		use_cycle;
+static int		cycle_fd;
 static bool		only_prefault;
 static bool		no_prefault;
 
@@ -37,7 +37,7 @@ static const struct option options[] = {
 		    "Specify routine to copy"),
 	OPT_INTEGER('i', "iterations", &iterations,
 		    "repeat memcpy() invocation this number of times"),
-	OPT_BOOLEAN('c', "clock", &use_clock,
+	OPT_BOOLEAN('c', "cycle", &use_cycle,
 		    "Use cycles event instead of gettimeofday() for measuring"),
 	OPT_BOOLEAN('o', "only-prefault", &only_prefault,
 		    "Show only the result with page faults before memcpy()"),
@@ -76,27 +76,27 @@ static const char * const bench_mem_memcpy_usage[] = {
 	NULL
 };
 
-static struct perf_event_attr clock_attr = {
+static struct perf_event_attr cycle_attr = {
 	.type		= PERF_TYPE_HARDWARE,
 	.config		= PERF_COUNT_HW_CPU_CYCLES
 };
 
-static void init_clock(void)
+static void init_cycle(void)
 {
-	clock_fd = sys_perf_event_open(&clock_attr, getpid(), -1, -1, 0);
+	cycle_fd = sys_perf_event_open(&cycle_attr, getpid(), -1, -1, 0);
 
-	if (clock_fd < 0 && errno == ENOSYS)
+	if (cycle_fd < 0 && errno == ENOSYS)
 		die("No CONFIG_PERF_EVENTS=y kernel support configured?\n");
 	else
-		BUG_ON(clock_fd < 0);
+		BUG_ON(cycle_fd < 0);
 }
 
-static u64 get_clock(void)
+static u64 get_cycle(void)
 {
 	int ret;
 	u64 clk;
 
-	ret = read(clock_fd, &clk, sizeof(u64));
+	ret = read(cycle_fd, &clk, sizeof(u64));
 	BUG_ON(ret != sizeof(u64));
 
 	return clk;
@@ -119,9 +119,9 @@ static void alloc_mem(void **dst, void **src, size_t length)
 		die("memory allocation failed - maybe length is too large?\n");
 }
 
-static u64 do_memcpy_clock(memcpy_t fn, size_t len, bool prefault)
+static u64 do_memcpy_cycle(memcpy_t fn, size_t len, bool prefault)
 {
-	u64 clock_start = 0ULL, clock_end = 0ULL;
+	u64 cycle_start = 0ULL, cycle_end = 0ULL;
 	void *src = NULL, *dst = NULL;
 	int i;
 
@@ -130,14 +130,14 @@ static u64 do_memcpy_clock(memcpy_t fn, size_t len, bool prefault)
 	if (prefault)
 		fn(dst, src, len);
 
-	clock_start = get_clock();
+	cycle_start = get_cycle();
 	for (i = 0; i < iterations; ++i)
 		fn(dst, src, len);
-	clock_end = get_clock();
+	cycle_end = get_cycle();
 
 	free(src);
 	free(dst);
-	return clock_end - clock_start;
+	return cycle_end - cycle_start;
 }
 
 static double do_memcpy_gettimeofday(memcpy_t fn, size_t len, bool prefault)
@@ -182,17 +182,17 @@ int bench_mem_memcpy(int argc, const char **argv,
 	int i;
 	size_t len;
 	double result_bps[2];
-	u64 result_clock[2];
+	u64 result_cycle[2];
 
 	argc = parse_options(argc, argv, options,
 			     bench_mem_memcpy_usage, 0);
 
-	if (use_clock)
-		init_clock();
+	if (use_cycle)
+		init_cycle();
 
 	len = (size_t)perf_atoll((char *)length_str);
 
-	result_clock[0] = result_clock[1] = 0ULL;
+	result_cycle[0] = result_cycle[1] = 0ULL;
 	result_bps[0] = result_bps[1] = 0.0;
 
 	if ((s64)len <= 0) {
@@ -223,11 +223,11 @@ int bench_mem_memcpy(int argc, const char **argv,
 
 	if (!only_prefault && !no_prefault) {
 		/* show both of results */
-		if (use_clock) {
-			result_clock[0] =
-				do_memcpy_clock(routines[i].fn, len, false);
-			result_clock[1] =
-				do_memcpy_clock(routines[i].fn, len, true);
+		if (use_cycle) {
+			result_cycle[0] =
+				do_memcpy_cycle(routines[i].fn, len, false);
+			result_cycle[1] =
+				do_memcpy_cycle(routines[i].fn, len, true);
 		} else {
 			result_bps[0] =
 				do_memcpy_gettimeofday(routines[i].fn,
@@ -237,9 +237,9 @@ int bench_mem_memcpy(int argc, const char **argv,
 						len, true);
 		}
 	} else {
-		if (use_clock) {
-			result_clock[pf] =
-				do_memcpy_clock(routines[i].fn,
+		if (use_cycle) {
+			result_cycle[pf] =
+				do_memcpy_cycle(routines[i].fn,
 						len, only_prefault);
 		} else {
 			result_bps[pf] =
@@ -251,12 +251,12 @@ int bench_mem_memcpy(int argc, const char **argv,
 	switch (bench_format) {
 	case BENCH_FORMAT_DEFAULT:
 		if (!only_prefault && !no_prefault) {
-			if (use_clock) {
-				printf(" %14lf Clock/Byte\n",
-					(double)result_clock[0]
+			if (use_cycle) {
+				printf(" %14lf Cycle/Byte\n",
+					(double)result_cycle[0]
 					/ (double)len);
-				printf(" %14lf Clock/Byte (with prefault)\n",
-					(double)result_clock[1]
+				printf(" %14lf Cycle/Byte (with prefault)\n",
+					(double)result_cycle[1]
 					/ (double)len);
 			} else {
 				print_bps(result_bps[0]);
@@ -265,9 +265,9 @@ int bench_mem_memcpy(int argc, const char **argv,
 				printf(" (with prefault)\n");
 			}
 		} else {
-			if (use_clock) {
-				printf(" %14lf Clock/Byte",
-					(double)result_clock[pf]
+			if (use_cycle) {
+				printf(" %14lf Cycle/Byte",
+					(double)result_cycle[pf]
 					/ (double)len);
 			} else
 				print_bps(result_bps[pf]);
@@ -277,17 +277,17 @@ int bench_mem_memcpy(int argc, const char **argv,
 		break;
 	case BENCH_FORMAT_SIMPLE:
 		if (!only_prefault && !no_prefault) {
-			if (use_clock) {
+			if (use_cycle) {
 				printf("%lf %lf\n",
-					(double)result_clock[0] / (double)len,
-					(double)result_clock[1] / (double)len);
+					(double)result_cycle[0] / (double)len,
+					(double)result_cycle[1] / (double)len);
 			} else {
 				printf("%lf %lf\n",
 					result_bps[0], result_bps[1]);
 			}
 		} else {
-			if (use_clock) {
-				printf("%lf\n", (double)result_clock[pf]
+			if (use_cycle) {
+				printf("%lf\n", (double)result_cycle[pf]
 					/ (double)len);
 			} else
 				printf("%lf\n", result_bps[pf]);
diff --git a/tools/perf/bench/mem-memset.c b/tools/perf/bench/mem-memset.c
index bf0d5f5..350cc95 100644
--- a/tools/perf/bench/mem-memset.c
+++ b/tools/perf/bench/mem-memset.c
@@ -24,8 +24,8 @@
 static const char	*length_str	= "1MB";
 static const char	*routine	= "default";
 static int		iterations	= 1;
-static bool		use_clock;
-static int		clock_fd;
+static bool		use_cycle;
+static int		cycle_fd;
 static bool		only_prefault;
 static bool		no_prefault;
 
@@ -37,7 +37,7 @@ static const struct option options[] = {
 		    "Specify routine to set"),
 	OPT_INTEGER('i', "iterations", &iterations,
 		    "repeat memset() invocation this number of times"),
-	OPT_BOOLEAN('c', "clock", &use_clock,
+	OPT_BOOLEAN('c', "cycle", &use_cycle,
 		    "Use cycles event instead of gettimeofday() for measuring"),
 	OPT_BOOLEAN('o', "only-prefault", &only_prefault,
 		    "Show only the result with page faults before memset()"),
@@ -76,27 +76,27 @@ static const char * const bench_mem_memset_usage[] = {
 	NULL
 };
 
-static struct perf_event_attr clock_attr = {
+static struct perf_event_attr cycle_attr = {
 	.type		= PERF_TYPE_HARDWARE,
 	.config		= PERF_COUNT_HW_CPU_CYCLES
 };
 
-static void init_clock(void)
+static void init_cycle(void)
 {
-	clock_fd = sys_perf_event_open(&clock_attr, getpid(), -1, -1, 0);
+	cycle_fd = sys_perf_event_open(&cycle_attr, getpid(), -1, -1, 0);
 
-	if (clock_fd < 0 && errno == ENOSYS)
+	if (cycle_fd < 0 && errno == ENOSYS)
 		die("No CONFIG_PERF_EVENTS=y kernel support configured?\n");
 	else
-		BUG_ON(clock_fd < 0);
+		BUG_ON(cycle_fd < 0);
 }
 
-static u64 get_clock(void)
+static u64 get_cycle(void)
 {
 	int ret;
 	u64 clk;
 
-	ret = read(clock_fd, &clk, sizeof(u64));
+	ret = read(cycle_fd, &clk, sizeof(u64));
 	BUG_ON(ret != sizeof(u64));
 
 	return clk;
@@ -115,9 +115,9 @@ static void alloc_mem(void **dst, size_t length)
 		die("memory allocation failed - maybe length is too large?\n");
 }
 
-static u64 do_memset_clock(memset_t fn, size_t len, bool prefault)
+static u64 do_memset_cycle(memset_t fn, size_t len, bool prefault)
 {
-	u64 clock_start = 0ULL, clock_end = 0ULL;
+	u64 cycle_start = 0ULL, cycle_end = 0ULL;
 	void *dst = NULL;
 	int i;
 
@@ -126,13 +126,13 @@ static u64 do_memset_clock(memset_t fn, size_t len, bool prefault)
 	if (prefault)
 		fn(dst, -1, len);
 
-	clock_start = get_clock();
+	cycle_start = get_cycle();
 	for (i = 0; i < iterations; ++i)
 		fn(dst, i, len);
-	clock_end = get_clock();
+	cycle_end = get_cycle();
 
 	free(dst);
-	return clock_end - clock_start;
+	return cycle_end - cycle_start;
 }
 
 static double do_memset_gettimeofday(memset_t fn, size_t len, bool prefault)
@@ -176,17 +176,17 @@ int bench_mem_memset(int argc, const char **argv,
 	int i;
 	size_t len;
 	double result_bps[2];
-	u64 result_clock[2];
+	u64 result_cycle[2];
 
 	argc = parse_options(argc, argv, options,
 			     bench_mem_memset_usage, 0);
 
-	if (use_clock)
-		init_clock();
+	if (use_cycle)
+		init_cycle();
 
 	len = (size_t)perf_atoll((char *)length_str);
 
-	result_clock[0] = result_clock[1] = 0ULL;
+	result_cycle[0] = result_cycle[1] = 0ULL;
 	result_bps[0] = result_bps[1] = 0.0;
 
 	if ((s64)len <= 0) {
@@ -217,11 +217,11 @@ int bench_mem_memset(int argc, const char **argv,
 
 	if (!only_prefault && !no_prefault) {
 		/* show both of results */
-		if (use_clock) {
-			result_clock[0] =
-				do_memset_clock(routines[i].fn, len, false);
-			result_clock[1] =
-				do_memset_clock(routines[i].fn, len, true);
+		if (use_cycle) {
+			result_cycle[0] =
+				do_memset_cycle(routines[i].fn, len, false);
+			result_cycle[1] =
+				do_memset_cycle(routines[i].fn, len, true);
 		} else {
 			result_bps[0] =
 				do_memset_gettimeofday(routines[i].fn,
@@ -231,9 +231,9 @@ int bench_mem_memset(int argc, const char **argv,
 						len, true);
 		}
 	} else {
-		if (use_clock) {
-			result_clock[pf] =
-				do_memset_clock(routines[i].fn,
+		if (use_cycle) {
+			result_cycle[pf] =
+				do_memset_cycle(routines[i].fn,
 						len, only_prefault);
 		} else {
 			result_bps[pf] =
@@ -245,12 +245,12 @@ int bench_mem_memset(int argc, const char **argv,
 	switch (bench_format) {
 	case BENCH_FORMAT_DEFAULT:
 		if (!only_prefault && !no_prefault) {
-			if (use_clock) {
-				printf(" %14lf Clock/Byte\n",
-					(double)result_clock[0]
+			if (use_cycle) {
+				printf(" %14lf Cycle/Byte\n",
+					(double)result_cycle[0]
 					/ (double)len);
-				printf(" %14lf Clock/Byte (with prefault)\n ",
-					(double)result_clock[1]
+				printf(" %14lf Cycle/Byte (with prefault)\n ",
+					(double)result_cycle[1]
 					/ (double)len);
 			} else {
 				print_bps(result_bps[0]);
@@ -259,9 +259,9 @@ int bench_mem_memset(int argc, const char **argv,
 				printf(" (with prefault)\n");
 			}
 		} else {
-			if (use_clock) {
-				printf(" %14lf Clock/Byte",
-					(double)result_clock[pf]
+			if (use_cycle) {
+				printf(" %14lf Cycle/Byte",
+					(double)result_cycle[pf]
 					/ (double)len);
 			} else
 				print_bps(result_bps[pf]);
@@ -271,17 +271,17 @@ int bench_mem_memset(int argc, const char **argv,
 		break;
 	case BENCH_FORMAT_SIMPLE:
 		if (!only_prefault && !no_prefault) {
-			if (use_clock) {
+			if (use_cycle) {
 				printf("%lf %lf\n",
-					(double)result_clock[0] / (double)len,
-					(double)result_clock[1] / (double)len);
+					(double)result_cycle[0] / (double)len,
+					(double)result_cycle[1] / (double)len);
 			} else {
 				printf("%lf %lf\n",
 					result_bps[0], result_bps[1]);
 			}
 		} else {
-			if (use_clock) {
-				printf("%lf\n", (double)result_clock[pf]
+			if (use_cycle) {
+				printf("%lf\n", (double)result_cycle[pf]
 					/ (double)len);
 			} else
 				printf("%lf\n", result_bps[pf]);
-- 
1.7.9.2.358.g22243


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

* Re: [GIT PULL 00/13] perf/core fixes and improvements
  2012-07-02 20:18 [GIT PULL 00/13] perf/core fixes and improvements Arnaldo Carvalho de Melo
                   ` (12 preceding siblings ...)
  2012-07-02 20:18 ` [PATCH 13/13] perf bench: Fix confused variable namings and descriptions in mem subsystem Arnaldo Carvalho de Melo
@ 2012-07-06  8:24 ` Ingo Molnar
  13 siblings, 0 replies; 18+ messages in thread
From: Ingo Molnar @ 2012-07-06  8:24 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arun Sharma, Benjamin Redelings, Corey Ashford,
	Cyrill Gorcunov, David Ahern, Frank Ch. Eigler,
	Frederic Weisbecker, Hitoshi Mitake, Jiri Olsa, Jovi Zhang,
	Konstantin Stepanyuk, Masami Hiramatsu, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Robert Richter, Stephane Eranian,
	Steven Rostedt, Tom Zanussi, Ulrich Drepper, arnaldo.melo,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit add79461a2a7d964a00b4a2fdaf313c4cf9cf4ec:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2012-06-29 15:11:26 +0200)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
> 
> for you to fetch changes up to 17d7a1123f0f6d532830152564cc812cc73db2f3:
> 
>   perf bench: Fix confused variable namings and descriptions in mem subsystem (2012-07-02 14:35:45 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes
> 
> . Fix libtraceevent 'clean' make target, from Namhyung Kim
> 
> . Teach ctags about libtraceevent error codes, from Namhyung Kim
> 
> . Fix libtraceevent dependency files usage, from Namhyung Kim
> 
> . Support hex number pretty printing in libtraceevent, fixing
>   kvm output, from Namhyung Kim
> 
> . Kill some die() usage in libtraceevent, from Namhyung Kim
> 
> . Improve support for hw breakpoints parsing/pretty printing/testing,
>   from Jiri Olsa
> 
> . Clarify perf bench option naming, from Hitoshi Mitake
> 
> . Look for ".note" ELF notes too, used in the kernel vdso, from Jiri Olsa
> 
> . Fix internal PMU list usage, removing leak, from Robert Richter
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Hitoshi Mitake (1):
>       perf bench: Fix confused variable namings and descriptions in mem subsystem
> 
> Jiri Olsa (4):
>       perf tools: Fix hw breakpoint's type modifier parsing
>       perf evsel: Handle hw breakpoints event names in perf_evsel__name()
>       perf symbols: Add '.note' check into search for NOTE section
>       perf tools: Adding round_up/round_down macros
> 
> Konstantin Stepanyuk (1):
>       tools lib traceevent: Fix clean target in Makefile
> 
> Namhyung Kim (6):
>       tools lib traceevent: Teach [ce]tags about libtraceeevent error codes
>       tools lib traceevent: Make dependency files regeneratable
>       tools lib traceevent: Check string is really printable
>       tools lib traceevent: Use local variable 'field'
>       tools lib traceevent: Add support for __print_hex()
>       tools lib traceevent: Replace malloc_or_die to plain malloc in alloc_event()
> 
> Robert Richter (1):
>       perf tools: Fix generation of pmu list
> 
>  tools/lib/traceevent/Makefile                      |   14 ++-
>  tools/lib/traceevent/event-parse.c                 |  112 ++++++++++++++++++--
>  tools/lib/traceevent/event-parse.h                 |    7 ++
>  tools/perf/Documentation/perf-bench.txt            |    4 +-
>  tools/perf/bench/mem-memcpy.c                      |   80 +++++++-------
>  tools/perf/bench/mem-memset.c                      |   80 +++++++-------
>  tools/perf/util/evsel.c                            |   30 ++++++
>  tools/perf/util/include/linux/kernel.h             |   10 ++
>  tools/perf/util/parse-events-test.c                |   47 ++++++++
>  tools/perf/util/parse-events.c                     |   20 ++--
>  tools/perf/util/parse-events.l                     |    2 +-
>  tools/perf/util/pmu.c                              |    3 +-
>  .../perf/util/scripting-engines/trace-event-perl.c |    4 +
>  .../util/scripting-engines/trace-event-python.c    |    4 +
>  tools/perf/util/symbol.c                           |   29 +++--
>  15 files changed, 335 insertions(+), 111 deletions(-)

Pulled, thanks Arnaldo!

	Ingo

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

end of thread, other threads:[~2012-07-06  8:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-02 20:18 [GIT PULL 00/13] perf/core fixes and improvements Arnaldo Carvalho de Melo
2012-07-02 20:18 ` [PATCH 01/13] tools lib traceevent: Fix clean target in Makefile Arnaldo Carvalho de Melo
2012-07-02 20:18 ` [PATCH 02/13] tools lib traceevent: Teach [ce]tags about libtraceeevent error codes Arnaldo Carvalho de Melo
2012-07-02 20:18 ` [PATCH 03/13] tools lib traceevent: Make dependency files regeneratable Arnaldo Carvalho de Melo
2012-07-02 20:18 ` [PATCH 04/13] tools lib traceevent: Check string is really printable Arnaldo Carvalho de Melo
2012-07-02 20:18 ` [PATCH 05/13] tools lib traceevent: Use local variable 'field' Arnaldo Carvalho de Melo
2012-07-02 20:18 ` [PATCH 06/13] tools lib traceevent: Add support for __print_hex() Arnaldo Carvalho de Melo
2012-07-02 20:18 ` [PATCH 07/13] tools lib traceevent: Replace malloc_or_die to plain malloc in alloc_event() Arnaldo Carvalho de Melo
2012-07-02 20:18 ` [PATCH 08/13] perf tools: Fix hw breakpoint's type modifier parsing Arnaldo Carvalho de Melo
2012-07-02 20:18 ` [PATCH 09/13] perf evsel: Handle hw breakpoints event names in perf_evsel__name() Arnaldo Carvalho de Melo
2012-07-02 20:18 ` [PATCH 10/13] perf tools: Fix generation of pmu list Arnaldo Carvalho de Melo
2012-07-02 20:18 ` [PATCH 11/13] perf symbols: Add '.note' check into search for NOTE section Arnaldo Carvalho de Melo
2012-07-02 20:18 ` [PATCH 12/13] perf tools: Adding round_up/round_down macros Arnaldo Carvalho de Melo
2012-07-02 20:18 ` [PATCH 13/13] perf bench: Fix confused variable namings and descriptions in mem subsystem Arnaldo Carvalho de Melo
2012-07-06  8:24 ` [GIT PULL 00/13] perf/core fixes and improvements Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2012-04-11 21:05 Arnaldo Carvalho de Melo
2012-04-13  7:58 ` Ingo Molnar
2012-03-16 20:01 Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox