Perf-tools create common process_event functions
PATCH 1/1 Perf-tools create common process_event functions
This continues the effort to prevent bit-rot in perf-annotate by using common functions for perf-report and perf-annotate where possible.
This creates the process.[ch] files.
More functions can be added here after - but this is a working step in the process.
John Kacur (2):
perf-tools: Add perf.data to .gitignore
perf-tools: Use common process_event functions for annotate and
report
tools/perf/.gitignore | 1 + tools/perf/Makefile | 2 + tools/perf/builtin-annotate.c | 56 +-------------------------------- tools/perf/builtin-report.c | 63 +------------------------------------ tools/perf/util/process_event.c | 53 +++++++++++++++++++++++++++++++ tools/perf/util/process_event.h | 29 +++++++++++++++++ tools/perf/util/process_events.c | 64 ++++++++++++++++++++++++++++++++++++++ tools/perf/util/process_events.h | 35 ++++++++++++++++++++ 8 files changed, 187 insertions(+), 116 deletions(-) create mode 100644 tools/perf/util/process_event.c create mode 100644 tools/perf/util/process_event.h create mode 100644 tools/perf/util/process_events.c create mode 100644 tools/perf/util/process_events.h
PATCH 1/1 perf-tools: Add perf.data to .gitignore
--- tools/perf/.gitignore | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
tools/perf/.gitignore +1 -0
@@ -12,6 +12,7 @@ perf*.1 perf*.xml perf*.html common-cmds.h +perf.data tags TAGS cscope*
Signature · 1 line
1.6.0.6
PATCH 1/1 perf-tools: Use common process_event functions for annotate and report
Prevent bit-rot in perf-annotate by using common functions where possible. Here we create process_events.[ch] to hold the common functions.
--- tools/perf/Makefile | 2 + tools/perf/builtin-annotate.c | 56 +-------------------------------- tools/perf/builtin-report.c | 63 +------------------------------------ tools/perf/util/process_event.c | 53 +++++++++++++++++++++++++++++++ tools/perf/util/process_event.h | 29 +++++++++++++++++ tools/perf/util/process_events.c | 64 ++++++++++++++++++++++++++++++++++++++ tools/perf/util/process_events.h | 35 ++++++++++++++++++++ 7 files changed, 186 insertions(+), 116 deletions(-) create mode 100644 tools/perf/util/process_event.c create mode 100644 tools/perf/util/process_event.h create mode 100644 tools/perf/util/process_events.c create mode 100644 tools/perf/util/process_events.h
tools/perf/Makefile +2 -0
@@ -369,6 +369,7 @@ LIB_H += util/sort.h LIB_H += util/hist.h LIB_H += util/thread.h LIB_H += util/data_map.h +LIB_H += util/process_events.h LIB_OBJS += util/abspath.o LIB_OBJS += util/alias.o
@@ -411,6 +412,7 @@ LIB_OBJS += util/svghelper.o LIB_OBJS += util/sort.o LIB_OBJS += util/hist.o LIB_OBJS += util/data_map.o +LIB_OBJS += util/process_events.o BUILTIN_OBJS += builtin-annotate.o
tools/perf/builtin-annotate.c +2 -54
80 lines not on this page · raw message
tools/perf/builtin-report.c +1 -62
87 lines not on this page · raw message
tools/perf/util/process_event.c new file +53 -0
53 lines not on this page · raw message
tools/perf/util/process_event.h new file +29 -0
@@ -0,0 +1,29 @@ +#ifndef __PROCESS_EVENT_H +#define __PROCESS_EVENT_H + +#include "../builtin.h" +#include "util.h" + +#include "color.h" +#include <linux/list.h> +#include "cache.h" +#include <linux/rbtree.h> +#include "symbol.h" +#include "string.h" + +#include "../perf.h" +#include "debug.h" + +#include "parse-options.h" +#include "parse-events.h" + +#include "thread.h" +#include "sort.h" +#include "hist.h" + +extern char *cwd; +extern int cwdlen; +extern int process_mmap_event (event_t *,unsigned long ,unsigned long ); +extern int process_comm_event (event_t *,unsigned long ,unsigned long ); + +#endif /* __PROCESS_H */
tools/perf/util/process_events.c new file +64 -0
64 lines not on this page · raw message
tools/perf/util/process_events.h new file +35 -0
@@ -0,0 +1,35 @@ +#ifndef __PROCESS_EVENTS_H +#define __PROCESS_EVENTS_H + +#include "../builtin.h" + +#include "util.h" +#include "color.h" +#include <linux/list.h> +#include "cache.h" +#include <linux/rbtree.h> +#include "symbol.h" +#include "string.h" +#include "callchain.h" +#include "strlist.h" +#include "values.h" + +#include "../perf.h" +#include "debug.h" +#include "header.h" + +#include "parse-options.h" +#include "parse-events.h" + +#include "data_map.h" +#include "thread.h" +#include "sort.h" +#include "hist.h" + +extern char *cwd; +extern int cwdlen; + +extern int process_mmap_event (event_t *,unsigned long ,unsigned long ); +extern int process_task_event (event_t *,unsigned long ,unsigned long ); + +#endif /* __PROCESS_EVENTS_H */
Signature · 1 line
1.6.0.6
[tip:perf/core] perf tools: Use common process_event functions for annotate and report
Commit-ID: e74328d3a17ed75ffdf72b86f289965823a47240 Gitweb: http://git.kernel.org/tip/e74328d3a17ed75ffdf72b86f289965823a47240 Author: John Kacur <[email protected]> AuthorDate: Tue, 24 Nov 2009 15:35:01 +0100 Committer: Ingo Molnar <[email protected]> CommitDate: Tue, 24 Nov 2009 16:37:01 +0100
perf tools: Use common process_event functions for annotate and report
Prevent bit-rot in perf-annotate by using common functions where possible. Here we create process_events.[ch] to hold the common functions.
LKML-Reference: <[email protected]>
--- tools/perf/Makefile | 2 + tools/perf/builtin-annotate.c | 56 +-------------------------------- tools/perf/builtin-report.c | 63 +------------------------------------ tools/perf/util/process_event.c | 53 +++++++++++++++++++++++++++++++ tools/perf/util/process_event.h | 29 +++++++++++++++++ tools/perf/util/process_events.c | 64 ++++++++++++++++++++++++++++++++++++++ tools/perf/util/process_events.h | 35 ++++++++++++++++++++ 7 files changed, 186 insertions(+), 116 deletions(-)
tools/perf/Makefile +2 -0
@@ -369,6 +369,7 @@ LIB_H += util/sort.h LIB_H += util/hist.h LIB_H += util/thread.h LIB_H += util/data_map.h +LIB_H += util/process_events.h LIB_OBJS += util/abspath.o LIB_OBJS += util/alias.o
@@ -411,6 +412,7 @@ LIB_OBJS += util/svghelper.o LIB_OBJS += util/sort.o LIB_OBJS += util/hist.o LIB_OBJS += util/data_map.o +LIB_OBJS += util/process_events.o BUILTIN_OBJS += builtin-annotate.o
tools/perf/builtin-annotate.c +2 -54
80 lines not on this page · raw message
tools/perf/builtin-report.c +1 -62
87 lines not on this page · raw message
tools/perf/util/process_event.c new file +53 -0
53 lines not on this page · raw message
tools/perf/util/process_event.h new file +29 -0
@@ -0,0 +1,29 @@ +#ifndef __PROCESS_EVENT_H +#define __PROCESS_EVENT_H + +#include "../builtin.h" +#include "util.h" + +#include "color.h" +#include <linux/list.h> +#include "cache.h" +#include <linux/rbtree.h> +#include "symbol.h" +#include "string.h" + +#include "../perf.h" +#include "debug.h" + +#include "parse-options.h" +#include "parse-events.h" + +#include "thread.h" +#include "sort.h" +#include "hist.h" + +extern char *cwd; +extern int cwdlen; +extern int process_mmap_event (event_t *,unsigned long ,unsigned long ); +extern int process_comm_event (event_t *,unsigned long ,unsigned long ); + +#endif /* __PROCESS_H */
tools/perf/util/process_events.c new file +64 -0
64 lines not on this page · raw message
tools/perf/util/process_events.h new file +35 -0
@@ -0,0 +1,35 @@ +#ifndef __PROCESS_EVENTS_H +#define __PROCESS_EVENTS_H + +#include "../builtin.h" + +#include "util.h" +#include "color.h" +#include <linux/list.h> +#include "cache.h" +#include <linux/rbtree.h> +#include "symbol.h" +#include "string.h" +#include "callchain.h" +#include "strlist.h" +#include "values.h" + +#include "../perf.h" +#include "debug.h" +#include "header.h" + +#include "parse-options.h" +#include "parse-events.h" + +#include "data_map.h" +#include "thread.h" +#include "sort.h" +#include "hist.h" + +extern char *cwd; +extern int cwdlen; + +extern int process_mmap_event (event_t *,unsigned long ,unsigned long ); +extern int process_task_event (event_t *,unsigned long ,unsigned long ); + +#endif /* __PROCESS_EVENTS_H */
[tip:perf/core] perf tools: Add perf.data to .gitignore
In reply to John KacurCommit-ID: c9c7ccaf3a2686ed3a44d69bb1f8b55eeead8a4e Gitweb: http://git.kernel.org/tip/c9c7ccaf3a2686ed3a44d69bb1f8b55eeead8a4e Author: John Kacur <[email protected]> AuthorDate: Tue, 24 Nov 2009 15:35:00 +0100 Committer: Ingo Molnar <[email protected]> CommitDate: Tue, 24 Nov 2009 16:37:01 +0100
perf tools: Add perf.data to .gitignore
LKML-Reference: <[email protected]>
--- tools/perf/.gitignore | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
tools/perf/.gitignore +1 -0
@@ -12,6 +12,7 @@ perf*.1 perf*.xml perf*.html common-cmds.h +perf.data tags TAGS cscope*
Quoted 12 lines · John Kacur
This continues the effort to prevent bit-rot in perf-annotate by using common functions for perf-report and perf-annotate where possible.
This creates the process.[ch] files.
More functions can be added here after - but this is a working step in the process.John Kacur (2):
perf-tools: Add perf.data to .gitignore
perf-tools: Use commonprocess_eventfunctions for annotate and
report
Quoted 13 lines
tools/perf/.gitignore | 1 + tools/perf/Makefile | 2 + tools/perf/builtin-annotate.c | 56 +-------------------------------- tools/perf/builtin-report.c | 63 +------------------------------------ tools/perf/util/process_event.c | 53 +++++++++++++++++++++++++++++++ tools/perf/util/process_event.h | 29 +++++++++++++++++ tools/perf/util/process_events.c | 64 ++++++++++++++++++++++++++++++++++++++ tools/perf/util/process_events.h | 35 ++++++++++++++++++++ 8 files changed, 187 insertions(+), 116 deletions(-) create mode 100644 tools/perf/util/process_event.c create mode 100644 tools/perf/util/process_event.h create mode 100644 tools/perf/util/process_events.c create mode 100644 tools/perf/util/process_events.h
Nice cleanups, applied to tip:perf/core, thanks John!
Ingo