Suzuki K. Poulose
60ebf32876
perf tools: Fix intlist node removal
...
Similar to the one in :
https://lkml.org/lkml/2012/8/29/27
Make sure we remove the node from the rblist before we delete the node.
The rblist__remove_node() will invoke rblist->node_delete, which will
take care of deleting the node with the suitable function provided by
the user.
Signed-off-by: Suzuki K Poulose <suzuki@in.ibm.com >
Acked-by: David Ahern <dsahern@gmail.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Suzuki K Poulose <suzuki@in.ibm.com >
Link: http://lkml.kernel.org/r/20120831065840.5167.90318.stgit@suzukikp.in.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-09-05 17:35:24 -03:00
David Ahern
09a2f16a91
perf tools: Fix x86 builds with ARCH specified on the command line
...
e.g., compiling i386 on x86_64 using:
$ make -C tools/perf ARCH=i386
fails with:
CC /tmp/pbuild/util/evsel.o
In file included from util/evsel.c:21:0:
util/perf_regs.h:5:23: fatal error: perf_regs.h: No such file or directory
compilation terminated.
Adding V=1 you see that the include argument for the arch is
'-Iarch/i386/include' is wrong. It is supposed to be -Iarch/x86/include
per the redefinition of ARCH in the Makefile.
According to the make manual,
http://www.gnu.org/software/make/manual/make.html#Override-Directive :
"If a variable has been set with a command argument (see Overriding
Variables), then ordinary assignments in the makefile are ignored. If
you want to set the variable in the makefile even though it was set
with a command argument, you can use an override directive ..."
Make it so.
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1346094354-74356-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-09-05 17:23:30 -03:00
David Ahern
8d3eca20b9
perf record: Remove use of die/exit
...
Allows perf to clean up properly on exit. If perf-record is exiting due
to failure, the on_exit should not run as the session has been deleted.
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1346005487-62961-8-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-09-05 17:22:41 -03:00
David Ahern
d54b1a9e0e
perf script: Remove use of die/exit
...
Allows perf to clean up properly on exit. Only exits left are exec
failures which are appropriate and usage callbacks that list available
options.
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1346005487-62961-7-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-09-05 17:21:39 -03:00
David Ahern
cc58482133
perf help: Remove use of die and handle errors
...
Allows perf to clean up properly on exit.
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1346005487-62961-6-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-09-05 17:21:10 -03:00
David Ahern
fceda7feb4
perf stat: Remove use of die/exit and handle errors
...
Allows perf to clean up properly on program termination.
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1346005487-62961-5-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-09-05 17:20:24 -03:00
David Ahern
33d6aef513
perf lock: Remove use of die and handle errors
...
Allows perf to clean up properly on exit.
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1346005487-62961-4-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-09-05 17:19:38 -03:00
David Ahern
1e6d532238
perf tool: handle errors in synthesized event functions
...
Handle error from process callback and propagate back to caller.
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1346005487-62961-3-git-send-email-dsahern@gmail.com
Signed-off-by: David Ahern <dsahern@gmail.com >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-09-05 17:17:30 -03:00
David Ahern
d25380cd3b
perf session: flush_sample_queue needs to handle errors from handlers
...
Allows errors to propogate through event processing code and back to
commands.
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1346005487-62961-2-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-09-05 17:17:30 -03:00
Steven Rostedt
ff1a70e75f
tools lib traceevent: Modify header to work in C++ programs
...
Replace keyword "private" to "priv" in event-parse.h to allow it to be
used in C++ programs.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@elte.hu >
Cc: Namhyung Kim <namhyung@gmail.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1345735321.5069.62.camel@gandalf.local.home
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-09-05 17:17:30 -03:00
K. Y. Srinivasan
969298879c
Tools: hv: Gather DNS information
...
Now, gather DNS information. Invoke an external script (that can be
distro dependent) to gather the DNS information.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com >
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 15:59:27 -07:00
K. Y. Srinivasan
d82c37ce68
Tools: hv: Add an example script to retrieve DNS entries
...
To keep the KVP daemon code free of distro specific details, we invoke an
external script to retrieve the DNS entries. This is an example script that
was used to test the KVP code. This script has to be implemented in a Distro
specific fashion. For instance on distros that ship with Network Manager enabled,
this script can be based on NM APIs.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com >
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 15:59:27 -07:00
K. Y. Srinivasan
d0cbc156a7
Tools: hv: Correctly type string variables
...
Correctly type character strings.
Reported-by: Ben Hutchings <ben@decadent.org.uk >
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com >
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 15:55:35 -07:00
K. Y. Srinivasan
00b8335517
Tools: hv: Get rid of some unused variables
...
Get rid of unused variables.
Reported-by: Ben Hutchings <ben@decadent.org.uk >
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com >
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-09-04 15:55:35 -07:00
Masanari Iida
3fd44cd40c
tools: perf: Fix typo in tools/perf
...
Correct spelling typo in tools/perf.
Signed-off-by: Masanari iida <standby24x7@gmail.com >
Signed-off-by: Jiri Kosina <jkosina@suse.cz >
2012-09-01 08:49:34 -07:00
Masanari Iida
ce8283d56c
tools/testing: fix comment / output typos
...
Correct spelling typo in tools/testing
Signed-off-by: Masanari Iida <standby24x7@gmail.com >
Signed-off-by: Jiri Kosina <jkosina@suse.cz >
2012-09-01 08:48:19 -07:00
Greg Kroah-Hartman
9db48aaf18
Merge 3.6-rc3 into driver-core-next
...
This picks up the printk fixes in 3.6-rc3 that are needed in this branch.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-08-27 07:08:39 -07:00
Namhyung Kim
f63fe79fa0
tools lib traceevent: Fix off-by-one bug in pevent_strerror()
...
As pevent_errno is defined using PEVENT_ERRORS which uses _PE macro
magic, the first errno is bigger than __PEVENT_ERRNO_START by 1. So we
need to subtract the 1 also when calculating the index of the error
strings.
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/1345707420-21767-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-23 11:29:20 -03:00
Namhyung Kim
e1aa7c30c5
tools lib traceevent: Fix strerror_r() use in pevent_strerror
...
glibc-2.16 starts to mark the function with attribute warn_unused_result
so that it can cause a build warning.
Since GNU version of strerror_r() can return a pointer to a string
without setting @buf, check the return value and copy/truncate it to our
buffer if needed.
Signed-off-by: Namhyung Kim <namhyung@kernel.org >
Acked-by: Kirill A. Shutemov <kirill@shutemov.name >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kirill A. Shutemov <kirill@shutemov.name >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Steven Rostedt <rostedt@goodmis.org >
Link: http://lkml.kernel.org/r/1345618831-9148-5-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-22 16:04:05 -03:00
Namhyung Kim
2f197b9d7e
tools lib traceevent: Introduce pevent_strerror
...
The pevent_strerror() sets @buf to a string that describes the
(libtraceevent-specific) error condition that is passed via @errnum.
This is similar to strerror_r() and does same thing if @errnum has a
standard errno value.
To sync error string with its code, define PEVENT_ERRORS with _PE()
macro and use it as suggested by Steven.
Signed-off-by: Namhyung Kim <namhyung@kernel.org >
Acked-by: Steven Rostedt <rostedt@goodmis.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/1345618831-9148-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-22 16:03:39 -03:00
Namhyung Kim
bffddffde7
tools lib traceevent: Introduce pevent_errno
...
Define and use error numbers for pevent_parse_event() and get rid of
die() and do_warning() calls. If the function returns non-zero value,
the caller can check the return code and do appropriate things.
I chose the error numbers to be negative not to clash with standard
errno, and as usual, 0 for success.
Signed-off-by: Namhyung Kim <namhyung@kernel.org >
Acked-by: Steven Rostedt <rostedt@goodmis.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/1345618831-9148-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-22 16:02:59 -03:00
Namhyung Kim
fd34f0b26c
tools lib traceevent: Do not link broken field arg for an old ftrace event
...
Defer linking a newly allocated arg to print_fmt.args until all of its
field is setup so that later access to ->field.name cannot be NULL.
Signed-off-by: Namhyung Kim <namhyung@kernel.org >
Acked-by: Steven Rostedt <rostedt@goodmis.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/1345618831-9148-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-22 16:02:36 -03:00
Jiri Olsa
1659d129ed
perf tools: Keep the perf_event_attr on version 3
...
Stashing version 4 under version 3 and removing version 4, because both
version changes were within single patchset.
Reported-by: Peter Zijlstra <a.p.zijlstra@chello.nl >
Signed-off-by: Jiri Olsa <jolsa@redhat.com >
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl >
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: H. Peter Anvin <hpa@zytor.com >
Cc: Ingo Molnar <mingo@kernel.org >
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: Thomas Gleixner <tglx@linutronix.de >
Cc: Tom Zanussi <tzanussi@gmail.com >
Cc: Ulrich Drepper <drepper@gmail.com >
Link: http://lkml.kernel.org/r/20120822083540.GB1003@krava.brq.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-22 15:33:12 -03:00
Robert Richter
50a9667c93
perf tools: Add pmu mappings to header information
...
With dynamic pmu allocation there are also dynamically assigned pmu ids.
These ids are used in event->attr.type to describe the pmu to be used
for that event. The information is available in sysfs, e.g:
/sys/bus/event_source/devices/breakpoint/type: 5
/sys/bus/event_source/devices/cpu/type: 4
/sys/bus/event_source/devices/ibs_fetch/type: 6
/sys/bus/event_source/devices/ibs_op/type: 7
/sys/bus/event_source/devices/software/type: 1
/sys/bus/event_source/devices/tracepoint/type: 2
These mappings are needed to know which samples belong to which pmu. If
a pmu is added dynamically like for ibs_fetch or ibs_op the type value
may vary.
Now, when decoding samples from perf.data this information in sysfs
might be no longer available or may have changed. We need to store it in
perf.data. Using the header for this. Now the header information created
with perf report contains an additional section looking like this:
# pmu mappings: ibs_op = 7, ibs_fetch = 6, cpu = 4, breakpoint = 5, tracepoint = 2, software = 1
Signed-off-by: Robert Richter <robert.richter@amd.com >
Acked-by: Peter Zijlstra <peterz@infradead.org >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1345144224-27280-9-git-send-email-robert.richter@amd.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-22 15:22:55 -03:00
Robert Richter
7c2f7afd36
perf report: Update event names from header description
...
Name events based on the event description in the perf.data header.
Example output:
$ perf report | grep '^#.*event'
# event : name = ibs_op/cnt_ctl=1/GH, type = 7, config = 0x80000, config1 = 0x0, config2 = 0x0, excl_usr = 0, excl_kern = 0, excl_host = 0, excl_guest = 0, precise_ip = 0, id = { 49, 50, 51, 52, 53, 54, 55, 56 }
# event : name = ibs_fetch/config=0/, type = 6, config = 0x0, config1 = 0x0, config2 = 0x0, excl_usr = 0, excl_kern = 0, excl_host = 0, excl_guest = 1, precise_ip = 0, id = { 57, 58, 59, 60, 61, 62, 63, 64 }
# Samples: 20K of event 'ibs_op/cnt_ctl=1/GH'
# Samples: 4K of event 'ibs_fetch/config=0/'
Note the new pmu event syntax of the names.
Signed-off-by: Robert Richter <robert.richter@amd.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1345144224-27280-8-git-send-email-robert.richter@amd.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-22 13:47:17 -03:00
Robert Richter
4e1b9c679f
perf tools: Refactor print_event_desc()
...
For later use we need a function read_event_desc() for processing the
event_desc feature. Split it from print_event_desc().
Signed-off-by: Robert Richter <robert.richter@amd.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1345144224-27280-7-git-send-email-robert.richter@amd.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-22 13:45:59 -03:00
Robert Richter
ac2ba9f36b
perf tools: Catch event names from command line
...
Use command line string provided by the -e option to name events. This
way we get unique events names that also support pmu event syntax
(<pmu_name>/<config>/<modifier>). No need to reconstruct the name
anymore from its attributes. We use the event_desc of the header to
store the name in the perf.data header. Thus it is also available for
perf report.
Implemented by putting the parser in different states to parse events or
configs.
And since event names are now generated from the command line
specification. Update event names in test cases accordingly.
Signed-off-by: Robert Richter <robert.richter@amd.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1345144224-27280-6-git-send-email-robert.richter@amd.com
[ committer note: Folded patch fixing 'perf test' failure reported by Jiri Olsa ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-22 13:40:49 -03:00
Robert Richter
9bfbbc6d1e
perf test: Do not abort tests on error
...
Run through all tests regardless of failures. On errors, return the
first error code detected.
Signed-off-by: Robert Richter <robert.richter@amd.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1345572195-23857-2-git-send-email-robert.richter@amd.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-22 13:34:23 -03:00
Jiri Olsa
d45a3e0068
perf tools: Fix 'No libunwind found' make warning message
...
Changing error message when libunwind support is not found to inform
properly to install libunwind-dev[el] package.
Reported-by: Ingo Molnar <mingo@elte.hu >
Signed-off-by: Jiri Olsa <jolsa@redhat.com >
Cc: Andi Kleen <andi@firstfloor.org >
Cc: Ben Hutchings <ben@decadent.org.uk >
Cc: Borislav Petkov <borislav.petkov@amd.com >
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Feng Tang <feng.tang@intel.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Namhyung Kim <namhyung.kim@lge.com >
Cc: Namhyung Kim <namhyung@gmail.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Pekka Enberg <penberg@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Robert Richter <robert.richter@amd.com >
Cc: Sedat Dilek <sedat.dilek@gmail.com >
Cc: Stephane Eranian <eranian@google.com >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Ulrich Drepper <drepper@gmail.com >
Link: http://lkml.kernel.org/r/20120822083812.GC1003@krava.brq.redhat.com
[ committer note: s/disable/disabling/g rewording suggested by Steven Rostedt ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-22 13:32:13 -03:00
Arnaldo Carvalho de Melo
3ab484b862
perf tools: Add missing files to build the python binding
...
Changeset 0f6a3015 :
"perf tools: Support user regs and stack in sample parsing"
uses hweight_long in evsel.c, so we need to drag util/hweight.c
to the python binding.
Ditto for ee8dd3c :
"perf tools: Change strlist to use the new rblist"
where we need to add util/rblist.c.
Now twatch.py works again:
# export PYTHONPATH=~acme/git/build/perf/python/
# ~acme/git/linux/tools/perf/python/twatch.py
cpu: 4, pid: 23639, tid: 23639 { type: fork, pid: 30659, ppid: 23639, tid: 30659, ptid: 23639, time: 36287872076780}
cpu: 5, pid: 30659, tid: 30659 { type: comm, pid: 30659, tid: 30659, comm: ls }
cpu: 5, pid: 30659, tid: 30659 { type: exit, pid: 30659, ppid: 30659, tid: 30659, ptid: 30659, time: 36287873681539}
cpu: 4, pid: 23639, tid: 23639 { type: fork, pid: 30660, ppid: 23639, tid: 30660, ptid: 23639, time: 36291720420480}
cpu: 5, pid: 30659, tid: 30659 { type: exit, pid: 30659, ppid: 30659, tid: 30659, ptid: 30659, time: 36287873685714}
cpu: 5, pid: 30660, tid: 30660 { type: comm, pid: 30660, tid: 30660, comm: git }
^C
KeyboardInterrupt
Reported-by: Jérôme Carretero <cJ-ko@zougloub.eu >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Namhyung Kim <namhyung@gmail.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/n/tip-gmq82zp5blin9aml9g5tzokr@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-21 10:31:40 -03:00
Namhyung Kim
000078bc3e
perf hists: Rename and move some functions
...
Rename functions for consistency and move callchain print function
into hist_entry__fprintf().
Signed-off-by: Namhyung Kim <namhyung@kernel.org >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1345438331-20234-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-20 09:47:31 -03:00
Namhyung Kim
7ccf4f9058
perf hists: Separate out hist print functions
...
Separate out those functions into ui/stdio/hist.c. This is required for
upcoming changes.
Signed-off-by: Namhyung Kim <namhyung@kernel.org >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1345438331-20234-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-20 09:46:34 -03:00
Ben Hutchings
ed7e2c2ec5
perf tools: Fix include order for bison/flex-generated C files
...
When we use a separate output directory, we add util/ to the include
path for the generated C files. However, this is currently added to the
end of the path, behind /usr/include/slang and /usr/include/gtk-2.0 if
use of the respective libraries is enabled. Thus the '#include
"../perf.h"' in util/parse-events.l can actually include
/usr/include/perf.h if it exists.
Move '-Iutil/' ahead of all the other preprocessor options.
Reported-by: Sedat Dilek <sedat.dilek@gmail.com >
Signed-off-by: Ben Hutchings <ben@decadent.org.uk >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Sedat Dilek <sedat.dilek@gmail.com >
Link: http://lkml.kernel.org/r/1345420039.22400.80.camel@deadeye.wl.decadent.org.uk
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-20 09:36:41 -03:00
David Ahern
f47b58b75f
perf symbols: Fix builds with NO_LIBELF set
...
Build currently fails:
$ make -C tools/perf O=/tmp/pbuild NO_LIBELF=1
util/symbol.c: In function ‘dso__load’:
util/symbol.c:1128:27: error: ‘struct symsrc’ has no member named ‘dynsym’
CC /tmp/pbuild/util/pager.o
make: *** [/tmp/pbuild/util/symbol.o] Error 1
make: *** Waiting for unfinished jobs....
Moving the dynsym reference to symbol-elf.c reveals that NO_LIBELF requires
NO_LIBUNWIND:
$ make -C tools/perf O=/tmp/pbuild NO_LIBELF=1
LINK /tmp/pbuild/perf
/tmp/pbuild/libperf.a(unwind.o): In function `elf_section_offset':
/opt/sw/ahern/perf.git/tools/perf/util/unwind.c:176: undefined reference to `elf_begin'
/opt/sw/ahern/perf.git/tools/perf/util/unwind.c:181: undefined reference to `gelf_getehdr'
/tmp/pbuild/libperf.a(unwind.o): In function `elf_section_by_name':
/opt/sw/ahern/perf.git/tools/perf/util/unwind.c:157: undefined reference to `elf_nextscn'
/opt/sw/ahern/perf.git/tools/perf/util/unwind.c:160: undefined reference to `gelf_getshdr'
/opt/sw/ahern/perf.git/tools/perf/util/unwind.c:161: undefined reference to `elf_strptr'
/tmp/pbuild/libperf.a(unwind.o): In function `elf_section_offset':
/opt/sw/ahern/perf.git/tools/perf/util/unwind.c:190: undefined reference to `elf_end'
/tmp/pbuild/libperf.a(unwind.o): In function `read_unwind_spec':
/opt/sw/ahern/perf.git/tools/perf/util/unwind.c:190: undefined reference to `elf_end'
collect2: ld returned 1 exit status
make: *** [/tmp/pbuild/perf] Error 1
make: Leaving directory `/opt/sw/ahern/perf.git/tools/perf'
This patch fixes both.
Reviewed-by: Namhyung Kim <namhyung@kernel.org >
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Link: http://lkml.kernel.org/r/1345391234-71906-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-20 09:35:22 -03:00
David Ahern
1c09bf4a79
perf: silence GTK2 probing errors
...
If GTK2 development packages are not installed, make is rather noisy:
$ make -C tools/perf O=/tmp/pbuild
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
make: Entering directory `/opt/sw/ahern/perf.git/tools/perf'
Makefile:593: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev
PERF_VERSION = 3.6.rc1.205.gdb146f.dirty
make: Leaving directory `/opt/sw/ahern/perf.git/tools/perf'
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
make: Entering directory `/opt/sw/ahern/perf.git/tools/perf'
Makefile:593: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev
...
Silence the pkg-config errors. Aftewards:
$ make -C tools/perf O=/tmp/pbuild
make: Entering directory `/opt/sw/ahern/perf.git/tools/perf'
Makefile:593: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev
PERF_VERSION = 3.6.rc1.206.gd43ff9.dirty
make: Leaving directory `/opt/sw/ahern/perf.git/tools/perf'
make: Entering directory `/opt/sw/ahern/perf.git/tools/perf'
Makefile:593: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev
...
Signed-off-by: David Ahern <dsahern@gmail.com >
Acked-by: Namhyung Kim <namhyung@kernel.org >
Acked-by: Pekka Enberg <penberg@kernel.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Pekka Enberg <penberg@kernel.org >
Link: http://lkml.kernel.org/r/1345391202-71865-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-20 09:33:29 -03:00
David Ahern
e8d0f400ee
perf script perl/python: Fix libexec scripts path in Documentation
...
The libexec path is /libexec/perf-core/scripts/*/Perf-Trace-Util.
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Link: http://lkml.kernel.org/r/1345391182-71825-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-20 09:30:36 -03:00
Namhyung Kim
2708bf3a30
perf ui gtk: Ensure not to call gtk_main_quit() twice
...
Currently the gtk_main_quit() is called twice when perf exits so the
following warning is emitted:
[penberg@tux perf]$ ./perf report --gtk
^Cperf: Interrupt
(perf:4048): Gtk-CRITICAL **: IA__gtk_main_quit: assertion `main_loops != NULL' failed
Fix it by not to call it unnecessarily.
Reported-by: Pekka Enberg <penberg@kernel.org >
Signed-off-by: Namhyung Kim <namhyung@kernel.org >
Acked-by: Pekka Enberg <penberg@kernel.org >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Pekka Enberg <penberg@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1345222583-3964-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-20 09:29:12 -03:00
Robert Richter
db146f06ac
perf tools: Rename global variable 'events' in util/header.c
...
Trivial patch that renames global variable 'events' in util/header.c.
Use a more specific naming to avoid conflicts. Same for variable
'event_count'.
Signed-off-by: Robert Richter <robert.richter@amd.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1345144224-27280-5-git-send-email-robert.richter@amd.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-17 13:13:08 -03:00
Robert Richter
6606f8733d
perf tools: Rename some variables for better understanding
...
Trivial patch to improve understanding of code.
Varible attr is usually used for struct perf_event_attr. Using it in a
different context is irritating. Thus, renaming it.
Signed-off-by: Robert Richter <robert.richter@amd.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1345144224-27280-4-git-send-email-robert.richter@amd.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-17 13:11:58 -03:00
Robert Richter
ca1b145761
perf tools: Report number of pmu type of unknown events
...
If detection fails and an event name is unknown, report the type number.
Example perf header output:
# Samples: 10K of event 'unknown attr type: 7'
Signed-off-by: Robert Richter <robert.richter@amd.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1345144224-27280-3-git-send-email-robert.richter@amd.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-17 13:11:29 -03:00
Robert Richter
f4d834367c
perf tools: Fix type for evsel->ids and add size check for ids
...
Use same type for ids everywhere.
In case of writing to perf.data the size is u32. In pipe mode it is
limited to header.size (less than u16). Adding a size check here.
Size overflow due to casting shouldn't actually happen in practice, but
during development this may cause type missmatch warninngs/errors,
unifying types avoids this.
Signed-off-by: Robert Richter <robert.richter@amd.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1345144224-27280-2-git-send-email-robert.richter@amd.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-17 12:38:07 -03:00
Namhyung Kim
0985a94891
perf ui gtk: Add perf_gtk__show_helpline() for pr_*
...
Use helpline for printing error/debug messages. The code resembles a TUI
counter part and only print the first line of the message.
Signed-off-by: Namhyung Kim <namhyung@kernel.org >
Acked-by: Pekka Enberg <penberg@kernel.org >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Pekka Enberg <penberg@kernel.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1345104894-14205-5-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-17 12:37:56 -03:00
Namhyung Kim
ed70c609ae
perf ui/gtk: Use helpline API in browser
...
As we now have a helpline implementation, use it for displaying help
messages.
Signed-off-by: Namhyung Kim <namhyung@kernel.org >
Acked-by: Pekka Enberg <penberg@kernel.org >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Pekka Enberg <penberg@kernel.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1345104894-14205-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-17 12:37:36 -03:00
Namhyung Kim
4bb1646a80
perf ui gtk: Implement helpline_fns
...
Add helpline API implementation to GTK front-end.
Signed-off-by: Namhyung Kim <namhyung@kernel.org >
Acked-by: Pekka Enberg <penberg@kernel.org >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Pekka Enberg <penberg@kernel.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1345104894-14205-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-17 12:37:11 -03:00
K. Y. Srinivasan
4a52c4af48
Tools: hv: Gather ipv[4,6] gateway information
...
Gather information on the default gateways - ipv4/ipv6.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com >
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-08-17 08:23:58 -07:00
K. Y. Srinivasan
6a60a6a8ea
Tools: hv: Represent the ipv6 mask using CIDR notation
...
Transform ipv6 subnet information to CIDR notation.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com >
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-08-17 08:23:58 -07:00
K. Y. Srinivasan
0440578459
Tools: hv: Gather subnet information
...
Now, gather sub-net information for the specified interface.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com >
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-08-17 08:23:58 -07:00
K. Y. Srinivasan
0d5b6b197f
Tools: hv: Gather address family information
...
Now, gather address family information for the specified interface.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com >
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-08-17 08:23:57 -07:00
K. Y. Srinivasan
af733015c9
Tools: hv: Further refactor kvp_get_ip_address()
...
In preparation for making kvp_get_ip_address() more generic, factor out
the code for handling IP addresses.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com >
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-08-17 08:23:57 -07:00
K. Y. Srinivasan
0ecaa1985e
Tools: hv: Prepare to expand kvp_get_ip_address() functionality
...
kvp_get_ip_address() implemented the functionality to retrieve IP address info.
Make this function more generic so that we could retrieve additional
per-interface information.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com >
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2012-08-17 08:23:57 -07:00