* [PATCH 0/4] perf tools: Misc fixies
@ 2013-09-12 16:39 Jiri Olsa
2013-09-12 16:39 ` [PATCH 1/4] perf tools: Fix 'make install prefix=...' build rule Jiri Olsa
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Jiri Olsa @ 2013-09-12 16:39 UTC (permalink / raw)
To: linux-kernel
Cc: Corey Ashford, Frederic Weisbecker, Ingo Molnar, Namhyung Kim,
Paul Mackerras, Peter Zijlstra, Arnaldo Carvalho de Melo,
David Ahern
hi,
sending misc standalone fixies from plugins support patchset,
plus one extra kmem command fix.
available at:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/core_file
thanks,
jirka
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
---
Jiri Olsa (4):
perf tools: Fix 'make install prefix=...' build rule
perf tools: Remove unused trace-event-* code
perf tools: Unify page_size usage
perf tools: Make kmem work for non numa machines
tools/perf/Makefile | 1 +
tools/perf/builtin-kmem.c | 2 +-
tools/perf/builtin-record.c | 5 +----
tools/perf/perf.c | 1 +
tools/perf/util/python.c | 1 +
tools/perf/util/trace-event-parse.c | 36 ------------------------------------
tools/perf/util/trace-event.h | 9 ---------
7 files changed, 5 insertions(+), 50 deletions(-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/4] perf tools: Fix 'make install prefix=...' build rule
2013-09-12 16:39 [PATCH 0/4] perf tools: Misc fixies Jiri Olsa
@ 2013-09-12 16:39 ` Jiri Olsa
2013-09-12 16:39 ` [PATCH 2/4] perf tools: Remove unused trace-event-* code Jiri Olsa
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Jiri Olsa @ 2013-09-12 16:39 UTC (permalink / raw)
To: linux-kernel
Cc: Jiri Olsa, Corey Ashford, Frederic Weisbecker, Ingo Molnar,
Namhyung Kim, Paul Mackerras, Peter Zijlstra,
Arnaldo Carvalho de Melo, David Ahern
Currently we fail for following make command:
$ sudo make install prefix=/opt/perf
...
GEN python/perf.so
install -d -m 755 '/opt/perf/bin'
install perf '/opt/perf/bin'
install perf-archive -t '/opt/perf/libexec/perf-core'
install: accessing `/opt/perf/libexec/perf-core': No such file or directory
make: *** [install-bin] Error 1
Fixing this by properly creating '/opt/perf/libexec/perf-core'
directory.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
---
tools/perf/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index c5dc1ad..229964a 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -769,6 +769,7 @@ check: $(OUTPUT)common-cmds.h
install-bin: all
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
$(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)'
+ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'
$(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'
ifndef NO_LIBPERL
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'
--
1.7.11.7
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/4] perf tools: Remove unused trace-event-* code
2013-09-12 16:39 [PATCH 0/4] perf tools: Misc fixies Jiri Olsa
2013-09-12 16:39 ` [PATCH 1/4] perf tools: Fix 'make install prefix=...' build rule Jiri Olsa
@ 2013-09-12 16:39 ` Jiri Olsa
2013-10-15 5:23 ` [tip:perf/core] " tip-bot for Jiri Olsa
2013-09-12 16:39 ` [PATCH 3/4] perf tools: Unify page_size usage Jiri Olsa
2013-09-12 16:39 ` [PATCH 4/4] perf tools: Make kmem work for non numa machines Jiri Olsa
3 siblings, 1 reply; 11+ messages in thread
From: Jiri Olsa @ 2013-09-12 16:39 UTC (permalink / raw)
To: linux-kernel
Cc: Jiri Olsa, Corey Ashford, Frederic Weisbecker, Ingo Molnar,
Namhyung Kim, Paul Mackerras, Peter Zijlstra,
Arnaldo Carvalho de Melo, David Ahern
Removing unused trace-event-* code.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
---
tools/perf/util/trace-event-parse.c | 36 ------------------------------------
tools/perf/util/trace-event.h | 9 ---------
2 files changed, 45 deletions(-)
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index fe7a27d..da28065 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -120,42 +120,6 @@ raw_field_value(struct event_format *event, const char *name, void *data)
return val;
}
-void *raw_field_ptr(struct event_format *event, const char *name, void *data)
-{
- struct format_field *field;
-
- field = pevent_find_any_field(event, name);
- if (!field)
- return NULL;
-
- if (field->flags & FIELD_IS_DYNAMIC) {
- int offset;
-
- offset = *(int *)(data + field->offset);
- offset &= 0xffff;
-
- return data + offset;
- }
-
- return data + field->offset;
-}
-
-int trace_parse_common_type(struct pevent *pevent, void *data)
-{
- struct pevent_record record;
-
- record.data = data;
- return pevent_data_type(pevent, &record);
-}
-
-int trace_parse_common_pid(struct pevent *pevent, void *data)
-{
- struct pevent_record record;
-
- record.data = data;
- return pevent_data_pid(pevent, &record);
-}
-
unsigned long long read_size(struct event_format *event, void *ptr, int size)
{
return pevent_read_number(event->pevent, ptr, size);
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index fafe1a4..04df631 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -11,8 +11,6 @@ union perf_event;
struct perf_tool;
struct thread;
-extern struct pevent *perf_pevent;
-
int bigendian(void);
struct pevent *read_trace_init(int file_bigendian, int host_bigendian);
@@ -23,26 +21,19 @@ int parse_ftrace_file(struct pevent *pevent, char *buf, unsigned long size);
int parse_event_file(struct pevent *pevent,
char *buf, unsigned long size, char *sys);
-struct pevent_record *trace_peek_data(struct pevent *pevent, int cpu);
-
unsigned long long
raw_field_value(struct event_format *event, const char *name, void *data);
-void *raw_field_ptr(struct event_format *event, const char *name, void *data);
void parse_proc_kallsyms(struct pevent *pevent, char *file, unsigned int size);
void parse_ftrace_printk(struct pevent *pevent, char *file, unsigned int size);
ssize_t trace_report(int fd, struct pevent **pevent, bool repipe);
-int trace_parse_common_type(struct pevent *pevent, void *data);
-int trace_parse_common_pid(struct pevent *pevent, void *data);
-
struct event_format *trace_find_next_event(struct pevent *pevent,
struct event_format *event);
unsigned long long read_size(struct event_format *event, void *ptr, int size);
unsigned long long eval_flag(const char *flag);
-struct pevent_record *trace_read_data(struct pevent *pevent, int cpu);
int read_tracing_data(int fd, struct list_head *pattrs);
struct tracing_data {
--
1.7.11.7
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/4] perf tools: Unify page_size usage
2013-09-12 16:39 [PATCH 0/4] perf tools: Misc fixies Jiri Olsa
2013-09-12 16:39 ` [PATCH 1/4] perf tools: Fix 'make install prefix=...' build rule Jiri Olsa
2013-09-12 16:39 ` [PATCH 2/4] perf tools: Remove unused trace-event-* code Jiri Olsa
@ 2013-09-12 16:39 ` Jiri Olsa
2013-10-15 5:23 ` [tip:perf/core] " tip-bot for Jiri Olsa
2013-09-12 16:39 ` [PATCH 4/4] perf tools: Make kmem work for non numa machines Jiri Olsa
3 siblings, 1 reply; 11+ messages in thread
From: Jiri Olsa @ 2013-09-12 16:39 UTC (permalink / raw)
To: linux-kernel
Cc: Jiri Olsa, Corey Ashford, Frederic Weisbecker, Ingo Molnar,
Namhyung Kim, Paul Mackerras, Peter Zijlstra,
Arnaldo Carvalho de Melo, David Ahern
Making page_size global from the util object.
Removing the not needed one.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
---
tools/perf/builtin-record.c | 5 +----
tools/perf/perf.c | 1 +
tools/perf/util/python.c | 1 +
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index a41ac415..ceea545 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -70,7 +70,6 @@ struct perf_record {
struct perf_session *session;
const char *progname;
int output;
- unsigned int page_size;
int realtime_prio;
bool no_buildid;
bool no_buildid_cache;
@@ -119,7 +118,7 @@ static int perf_record__mmap_read(struct perf_record *rec,
{
unsigned int head = perf_mmap__read_head(md);
unsigned int old = md->prev;
- unsigned char *data = md->base + rec->page_size;
+ unsigned char *data = md->base + page_size;
unsigned long size;
void *buf;
int rc = 0;
@@ -360,8 +359,6 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
rec->progname = argv[0];
- rec->page_size = sysconf(_SC_PAGE_SIZE);
-
on_exit(perf_record__sig_exit, rec);
signal(SIGCHLD, sig_handler);
signal(SIGINT, sig_handler);
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index 85e1aed..6f0a209 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -456,6 +456,7 @@ int main(int argc, const char **argv)
{
const char *cmd;
+ /* The page_size is placed in util object. */
page_size = sysconf(_SC_PAGE_SIZE);
cmd = perf_extract_argv0_path(argv[0]);
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
index 3eddf96..06efd02 100644
--- a/tools/perf/util/python.c
+++ b/tools/perf/util/python.c
@@ -1029,6 +1029,7 @@ PyMODINIT_FUNC initperf(void)
pyrf_cpu_map__setup_types() < 0)
return;
+ /* The page_size is placed in util object. */
page_size = sysconf(_SC_PAGE_SIZE);
Py_INCREF(&pyrf_evlist__type);
--
1.7.11.7
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/4] perf tools: Make kmem work for non numa machines
2013-09-12 16:39 [PATCH 0/4] perf tools: Misc fixies Jiri Olsa
` (2 preceding siblings ...)
2013-09-12 16:39 ` [PATCH 3/4] perf tools: Unify page_size usage Jiri Olsa
@ 2013-09-12 16:39 ` Jiri Olsa
2013-09-23 13:50 ` Jiri Olsa
2013-09-25 18:30 ` [tip:perf/urgent] perf kmem: Make it work again on non NUMA machines tip-bot for Jiri Olsa
3 siblings, 2 replies; 11+ messages in thread
From: Jiri Olsa @ 2013-09-12 16:39 UTC (permalink / raw)
To: linux-kernel
Cc: Jiri Olsa, Namhyung Kim, Corey Ashford, Frederic Weisbecker,
Paul Mackerras, Peter Zijlstra, Arnaldo Carvalho de Melo
The commit '2814eb0 perf kmem: Remove die() calls' disabled
kmem command for machines without numa support. It made the
command fail if '/sys/devices/system/node' dir wasn't found.
Skipping the numa based initialization in case the directory
is not found and continue execution.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-kmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index c2dff9c..9b5f077 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -101,7 +101,7 @@ static int setup_cpunode_map(void)
dir1 = opendir(PATH_SYS_NODE);
if (!dir1)
- return -1;
+ return 0;
while ((dent1 = readdir(dir1)) != NULL) {
if (dent1->d_type != DT_DIR ||
--
1.7.11.7
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 4/4] perf tools: Make kmem work for non numa machines
2013-09-12 16:39 ` [PATCH 4/4] perf tools: Make kmem work for non numa machines Jiri Olsa
@ 2013-09-23 13:50 ` Jiri Olsa
2013-09-23 17:15 ` Arnaldo Carvalho de Melo
2013-09-25 18:30 ` [tip:perf/urgent] perf kmem: Make it work again on non NUMA machines tip-bot for Jiri Olsa
1 sibling, 1 reply; 11+ messages in thread
From: Jiri Olsa @ 2013-09-23 13:50 UTC (permalink / raw)
To: linux-kernel
Cc: Namhyung Kim, Corey Ashford, Frederic Weisbecker, Paul Mackerras,
Peter Zijlstra, Arnaldo Carvalho de Melo
On Thu, Sep 12, 2013 at 06:39:36PM +0200, Jiri Olsa wrote:
> The commit '2814eb0 perf kmem: Remove die() calls' disabled
> kmem command for machines without numa support. It made the
> command fail if '/sys/devices/system/node' dir wasn't found.
>
> Skipping the numa based initialization in case the directory
> is not found and continue execution.
>
> Signed-off-by: Jiri Olsa <jolsa@redhat.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
ping
thanks,
jirka
> ---
> tools/perf/builtin-kmem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
> index c2dff9c..9b5f077 100644
> --- a/tools/perf/builtin-kmem.c
> +++ b/tools/perf/builtin-kmem.c
> @@ -101,7 +101,7 @@ static int setup_cpunode_map(void)
>
> dir1 = opendir(PATH_SYS_NODE);
> if (!dir1)
> - return -1;
> + return 0;
>
> while ((dent1 = readdir(dir1)) != NULL) {
> if (dent1->d_type != DT_DIR ||
> --
> 1.7.11.7
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/4] perf tools: Make kmem work for non numa machines
2013-09-23 13:50 ` Jiri Olsa
@ 2013-09-23 17:15 ` Arnaldo Carvalho de Melo
2013-09-23 17:21 ` Jiri Olsa
0 siblings, 1 reply; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-09-23 17:15 UTC (permalink / raw)
To: Jiri Olsa
Cc: linux-kernel, Namhyung Kim, Corey Ashford, Frederic Weisbecker,
Paul Mackerras, Peter Zijlstra
Em Mon, Sep 23, 2013 at 03:50:31PM +0200, Jiri Olsa escreveu:
>
> ping
Its in perf/core, guess should send it via perf/urgent too, right?
- Arnaldo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/4] perf tools: Make kmem work for non numa machines
2013-09-23 17:15 ` Arnaldo Carvalho de Melo
@ 2013-09-23 17:21 ` Jiri Olsa
0 siblings, 0 replies; 11+ messages in thread
From: Jiri Olsa @ 2013-09-23 17:21 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Namhyung Kim, Corey Ashford, Frederic Weisbecker,
Paul Mackerras, Peter Zijlstra
On Mon, Sep 23, 2013 at 02:15:34PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Sep 23, 2013 at 03:50:31PM +0200, Jiri Olsa escreveu:
> >
> > ping
>
> Its in perf/core, guess should send it via perf/urgent too, right?
>
that would be great, thanks
jirka
^ permalink raw reply [flat|nested] 11+ messages in thread
* [tip:perf/urgent] perf kmem: Make it work again on non NUMA machines
2013-09-12 16:39 ` [PATCH 4/4] perf tools: Make kmem work for non numa machines Jiri Olsa
2013-09-23 13:50 ` Jiri Olsa
@ 2013-09-25 18:30 ` tip-bot for Jiri Olsa
1 sibling, 0 replies; 11+ messages in thread
From: tip-bot for Jiri Olsa @ 2013-09-25 18:30 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, paulus, hpa, mingo, a.p.zijlstra, namhyung,
jolsa, fweisbec, tglx, cjashfor
Commit-ID: 4921e320244e099bdf237fd10428594ce5f5b87d
Gitweb: http://git.kernel.org/tip/4921e320244e099bdf237fd10428594ce5f5b87d
Author: Jiri Olsa <jolsa@redhat.com>
AuthorDate: Thu, 12 Sep 2013 18:39:36 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 24 Sep 2013 14:13:46 -0300
perf kmem: Make it work again on non NUMA machines
The commit '2814eb0 perf kmem: Remove die() calls' disabled 'perf kmem'
command for machines without numa support. It made the command fail if
'/sys/devices/system/node' dir wasn't found.
Skipping the numa based initialization in case the directory is not
found and continue execution.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@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/1379003976-5839-5-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-kmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index c2dff9c..9b5f077 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -101,7 +101,7 @@ static int setup_cpunode_map(void)
dir1 = opendir(PATH_SYS_NODE);
if (!dir1)
- return -1;
+ return 0;
while ((dent1 = readdir(dir1)) != NULL) {
if (dent1->d_type != DT_DIR ||
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [tip:perf/core] perf tools: Remove unused trace-event-* code
2013-09-12 16:39 ` [PATCH 2/4] perf tools: Remove unused trace-event-* code Jiri Olsa
@ 2013-10-15 5:23 ` tip-bot for Jiri Olsa
0 siblings, 0 replies; 11+ messages in thread
From: tip-bot for Jiri Olsa @ 2013-10-15 5:23 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, paulus, hpa, mingo, a.p.zijlstra, namhyung,
jolsa, fweisbec, dsahern, tglx, cjashfor, mingo
Commit-ID: 5283ec23a02e8afdc984c7f5f07e2a2662d4934a
Gitweb: http://git.kernel.org/tip/5283ec23a02e8afdc984c7f5f07e2a2662d4934a
Author: Jiri Olsa <jolsa@redhat.com>
AuthorDate: Thu, 12 Sep 2013 18:39:34 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 9 Oct 2013 11:15:28 -0300
perf tools: Remove unused trace-event-* code
Removing unused trace-event-* code.
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
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/1379003976-5839-3-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/trace-event-parse.c | 36 ------------------------------------
tools/perf/util/trace-event.h | 9 ---------
2 files changed, 45 deletions(-)
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index e9e1c03..6681f71 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -120,42 +120,6 @@ raw_field_value(struct event_format *event, const char *name, void *data)
return val;
}
-void *raw_field_ptr(struct event_format *event, const char *name, void *data)
-{
- struct format_field *field;
-
- field = pevent_find_any_field(event, name);
- if (!field)
- return NULL;
-
- if (field->flags & FIELD_IS_DYNAMIC) {
- int offset;
-
- offset = *(int *)(data + field->offset);
- offset &= 0xffff;
-
- return data + offset;
- }
-
- return data + field->offset;
-}
-
-int trace_parse_common_type(struct pevent *pevent, void *data)
-{
- struct pevent_record record;
-
- record.data = data;
- return pevent_data_type(pevent, &record);
-}
-
-int trace_parse_common_pid(struct pevent *pevent, void *data)
-{
- struct pevent_record record;
-
- record.data = data;
- return pevent_data_pid(pevent, &record);
-}
-
unsigned long long read_size(struct event_format *event, void *ptr, int size)
{
return pevent_read_number(event->pevent, ptr, size);
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index fafe1a4..04df631 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -11,8 +11,6 @@ union perf_event;
struct perf_tool;
struct thread;
-extern struct pevent *perf_pevent;
-
int bigendian(void);
struct pevent *read_trace_init(int file_bigendian, int host_bigendian);
@@ -23,26 +21,19 @@ int parse_ftrace_file(struct pevent *pevent, char *buf, unsigned long size);
int parse_event_file(struct pevent *pevent,
char *buf, unsigned long size, char *sys);
-struct pevent_record *trace_peek_data(struct pevent *pevent, int cpu);
-
unsigned long long
raw_field_value(struct event_format *event, const char *name, void *data);
-void *raw_field_ptr(struct event_format *event, const char *name, void *data);
void parse_proc_kallsyms(struct pevent *pevent, char *file, unsigned int size);
void parse_ftrace_printk(struct pevent *pevent, char *file, unsigned int size);
ssize_t trace_report(int fd, struct pevent **pevent, bool repipe);
-int trace_parse_common_type(struct pevent *pevent, void *data);
-int trace_parse_common_pid(struct pevent *pevent, void *data);
-
struct event_format *trace_find_next_event(struct pevent *pevent,
struct event_format *event);
unsigned long long read_size(struct event_format *event, void *ptr, int size);
unsigned long long eval_flag(const char *flag);
-struct pevent_record *trace_read_data(struct pevent *pevent, int cpu);
int read_tracing_data(int fd, struct list_head *pattrs);
struct tracing_data {
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [tip:perf/core] perf tools: Unify page_size usage
2013-09-12 16:39 ` [PATCH 3/4] perf tools: Unify page_size usage Jiri Olsa
@ 2013-10-15 5:23 ` tip-bot for Jiri Olsa
0 siblings, 0 replies; 11+ messages in thread
From: tip-bot for Jiri Olsa @ 2013-10-15 5:23 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, paulus, hpa, mingo, a.p.zijlstra, namhyung,
jolsa, fweisbec, dsahern, tglx, cjashfor, mingo
Commit-ID: 918512b435e15fefe609d236e0ecd62cb8f389c9
Gitweb: http://git.kernel.org/tip/918512b435e15fefe609d236e0ecd62cb8f389c9
Author: Jiri Olsa <jolsa@redhat.com>
AuthorDate: Thu, 12 Sep 2013 18:39:35 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 9 Oct 2013 11:22:55 -0300
perf tools: Unify page_size usage
Making page_size global from the util object.
Removing the not needed one.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
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/1379003976-5839-4-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-record.c | 5 +----
tools/perf/perf.c | 1 +
tools/perf/util/python.c | 1 +
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index cf36ba2..0aacd62 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -70,7 +70,6 @@ struct perf_record {
struct perf_session *session;
const char *progname;
int output;
- unsigned int page_size;
int realtime_prio;
bool no_buildid;
bool no_buildid_cache;
@@ -119,7 +118,7 @@ static int perf_record__mmap_read(struct perf_record *rec,
{
unsigned int head = perf_mmap__read_head(md);
unsigned int old = md->prev;
- unsigned char *data = md->base + rec->page_size;
+ unsigned char *data = md->base + page_size;
unsigned long size;
void *buf;
int rc = 0;
@@ -360,8 +359,6 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
rec->progname = argv[0];
- rec->page_size = sysconf(_SC_PAGE_SIZE);
-
on_exit(perf_record__sig_exit, rec);
signal(SIGCHLD, sig_handler);
signal(SIGINT, sig_handler);
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index 245020c..6265778 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -456,6 +456,7 @@ int main(int argc, const char **argv)
{
const char *cmd;
+ /* The page_size is placed in util object. */
page_size = sysconf(_SC_PAGE_SIZE);
cmd = perf_extract_argv0_path(argv[0]);
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
index 71b5412..a24ce0a 100644
--- a/tools/perf/util/python.c
+++ b/tools/perf/util/python.c
@@ -1036,6 +1036,7 @@ PyMODINIT_FUNC initperf(void)
pyrf_cpu_map__setup_types() < 0)
return;
+ /* The page_size is placed in util object. */
page_size = sysconf(_SC_PAGE_SIZE);
Py_INCREF(&pyrf_evlist__type);
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-10-15 5:25 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-12 16:39 [PATCH 0/4] perf tools: Misc fixies Jiri Olsa
2013-09-12 16:39 ` [PATCH 1/4] perf tools: Fix 'make install prefix=...' build rule Jiri Olsa
2013-09-12 16:39 ` [PATCH 2/4] perf tools: Remove unused trace-event-* code Jiri Olsa
2013-10-15 5:23 ` [tip:perf/core] " tip-bot for Jiri Olsa
2013-09-12 16:39 ` [PATCH 3/4] perf tools: Unify page_size usage Jiri Olsa
2013-10-15 5:23 ` [tip:perf/core] " tip-bot for Jiri Olsa
2013-09-12 16:39 ` [PATCH 4/4] perf tools: Make kmem work for non numa machines Jiri Olsa
2013-09-23 13:50 ` Jiri Olsa
2013-09-23 17:15 ` Arnaldo Carvalho de Melo
2013-09-23 17:21 ` Jiri Olsa
2013-09-25 18:30 ` [tip:perf/urgent] perf kmem: Make it work again on non NUMA machines tip-bot for Jiri Olsa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox