Palmer Cox
7f309ed645
perf tools: Remove brace expansion from clean target
...
The clean target uses brace expansion to remove some generated files. However,
the default shells on many systems do not support this feature resulting in
some generated files not being removed by clean.
Signed-off-by: Palmer Cox <p@lmercox.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1343598883-17907-1-git-send-email-p@lmercox.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-03 10:46:32 -03:00
David Ahern
6b118e92cc
perf kvm top: Limit guest kernel info message to once
...
'perf kvm top' shows a continual flurry of:
Can't find guest [5201]'s kernel information
if it can't find the guest info and with a lot of VMs running a user has no
chance of reading them all. Limit message to once per guest.
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1343709095-7089-5-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-03 10:43:47 -03:00
David Ahern
70b40c4a43
perf tools: Introduce intlist
...
Built on rblist - like strlist. Used in the next patch.
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1343709095-7089-4-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-03 10:42:25 -03:00
David Ahern
ee8dd3ca43
perf tools: Change strlist to use the new rblist
...
Replaces the direct use of rbtree code with the rblist API. In the end
the patch is a no-op on strlist functionality; the API for strlist is
not changed, only its implementaton.
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1343709095-7089-3-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-03 10:39:51 -03:00
David Ahern
37bbd3fff1
perf tools: Introducing rblist
...
rblist is the rbtree based code from strlist. It will be the common code
for strlist and the to-be-introduced intlist.
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1343709095-7089-2-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-03 10:37:21 -03:00
David Ahern
347ed9903a
perf kvm: Use strtol for walking guestmount directory
...
Only want to process directories under the guestmnount directory that
have a pid as a name (ie, all digits). Other entries in the guestmount
directory should be ignored. There is already a check that requires the
first character of each entry to be a digit, but atoi is used to convert
the directory name to a pid. For example if guestmount contains a
directory with the name 1foo, atoi converts it to a pid of 1 and a
machine is created with a pid of 1. This is wrong; this directory really
should be ignored. Use strtol to do that.
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1343616875-6455-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-03 10:35:23 -03:00
David Ahern
56e6f602aa
perf tool: Save cmdline from user in file header vs what is passed to record
...
A number of builtin commands process some user args and then pass the rest to
cmd_record. cmd_record then saves argc/argv that it receives into the header of
the perf data file. But this loses the arguments handled by the first command
-- ie., the real command line from the user. This patch saves the command line
as typed by the user rather than what was passed to cmd_record.
As an example consider the command:
$ perf kvm --guest --host --guestmount=/tmp/guest-mount record
-fo /tmp/perf.data -ag -- sleep 10
Currently the command saved to the header is:
cmdline : /tmp/p3.5/perf record -o perf.data.kvm -fo /tmp/perf.data -ag -- sleep 1
(ignore the duplicated -o -- the first would be yet another bug with perf-kvm).
With this patch the command line saved to the header is:
cmdline : /tmp/p3.5/perf kvm --guest --host --guestmount=/tmp/guest-mount
record -fo /tmp/perf.data -ag -- sleep 1
v2: simplified to saving the command in parse_options per Stephane's suggestion
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Namhyung Kim <namhyung@gmail.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/r/1343616831-6408-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-03 10:33:50 -03:00
David Ahern
1a31fc904f
perf top: Error handling for counter creation should parallel perf-record
...
5a7ed29 fixed up perf-record but not perf-top. Similar argument holds
for it -- fallback to PMU only if it does not exist and handle invalid
attributes separately.
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Robert Richter <robert.richter@amd.com >
Link: http://lkml.kernel.org/r/1343616783-6360-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-03 10:30:18 -03:00
Arnaldo Carvalho de Melo
7405ed10f6
perf session: Remove no longer used synthesize_sample method
...
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-jd8tqbx8o8bs4t4g50vyhoc2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-02 21:02:02 -03:00
Arnaldo Carvalho de Melo
a3f698fe30
perf evsel: Adopt parse_sample method from perf_event
...
Since we need evsel->{attr.{sample_{id_all,type}},sample_size},
reducing the number of parameters tools have to pass.
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-wdtmgak0ihgsmw1brb54a8h4@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-02 12:23:46 -03:00
Arnaldo Carvalho de Melo
cb0b29e086
perf evlist: Introduce perf_evlist__parse_sample
...
That is a more compact form of perf_session__parse_sample and to support
multiple evlists per perf_session is the way to go anyway.
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-vkxx3j5qktoj11bvcwmfjj13@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-02 11:42:57 -03:00
Arnaldo Carvalho de Melo
7b56cce271
perf session: Use perf_evlist__id_hdr_size more extensively
...
Removing perf_session->id_hdr_size, as it can be obtained from the
evsel/evlist.
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-1nwc2kslu7gsfblu98xbqbll@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-01 19:31:00 -03:00
Arnaldo Carvalho de Melo
5e5624745d
perf session: Use perf_evlist__sample_id_all more extensively
...
Removing perf_session->sample_id_all, as it can be obtained from the
evsel/evlist.
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-ok58u1mlc5ci9b6p36r52uh1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-01 19:25:26 -03:00
Arnaldo Carvalho de Melo
7f3be652c1
perf session: Use perf_evlist__sample_type more extensively
...
Removing perf_session->sample_type, as it can be obtained from the
evsel/evlist.
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-mnt1zwlik7sp7z6ljc9kyefg@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-01 19:15:52 -03:00
Arnaldo Carvalho de Melo
bde09467b5
perf evsel: Precalculate the sample size
...
So that we don't have to store it in the perf_session instance, because
in the future perf_session instances may have multiple evlists, each
with different sample_type/sizes.
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-ptod86fxkpgq3h62m9refkv4@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-01 18:53:11 -03:00
Namhyung Kim
0ecf4f0c02
perf target: Fix check on buffer size
...
It was a mistake just replace assert to BUG_ON since its condition
should be negated. Fix it.
Signed-off-by: Namhyung Kim <namhyung@kernel.org >
Cc: "Kirill A. Shutemov" <kirill@shutemov.name >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Kirill A. Shutemov <kirill@shutemov.name >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Ulrich Drepper <drepper@gmail.com >
Link: http://lkml.kernel.org/r/1343267410-7758-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-01 18:42:54 -03:00
Jiri Olsa
028df76726
perf symbols: Fix array sizes for binary types arrays
...
Following commit introduced wrong array boundaries, that could lead to
SIGSEGV.
perf symbols: Factor DSO symtab types to generic binary types
commit 44f24cb315
Author: Jiri Olsa <jolsa@redhat.com >
Fixing to use proper array size.
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de >
Signed-off-by: Jiri Olsa <jolsa@redhat.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Markus Trippelsdorf <markus@trippelsdorf.de >
Link: http://lkml.kernel.org/r/1343825277-10517-1-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-01 18:42:22 -03:00
Jiri Olsa
30f31c0a49
perf test: Fix parse events automated tests
...
Parse events tests got broken after following commit:
perf tools: Fix trace events storms due to weight demux
commit 0983cc0dbc
Author: Frederic Weisbecker <fweisbec@gmail.com >
that added PERF_SAMPLE_PERIOD sample type for tracepoints.
Updating related tests.
Signed-off-by: Jiri Olsa <jolsa@redhat.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1343825338-10618-1-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-08-01 18:42:10 -03:00
Cody Schafer
8696329b7b
perf annotate: Prevent overflow in size calculation
...
A large enough symbol size causes an overflow in the size parameter to
the histogram allocation, leading to a segfault in
symbol__inc_addr_samples later on when this histogram is accessed.
In the case of being called via perf-report, this returns back and
gracefully ignores the sample, eventually ignoring the chained return
value of perf_session_deliver_event in flush_sample_queue.
Signed-off-by: Cody Schafer <cody@linux.vnet.ibm.com >
Acked-by: Namhyung Kim <namhyung@kernel.org >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com >
Link: http://lkml.kernel.org/r/1342753525-4521-1-git-send-email-cody@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-07-25 13:06:42 -03:00
Kirill A. Shutemov
043d1a5c14
perf tools: Fix build error with bison 2.6
...
Bison 2.6 started to generate parse_events_parse() declaration in header. In
this case we have redundant redeclaration:
util/parse-events.c:29:5: error: redundant redeclaration of ‘parse_events_parse’ [-Werror=redundant-decls]
In file included from util/parse-events.c:14:0:
util/parse-events-bison.h:99:5: note: previous declaration of ‘parse_events_parse’ was here
cc1: all warnings being treated as errors
Let's disable -Wredundant-decls for util/parse-events.c since it includes
header we can't control.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name >
Cc: Ingo Molnar <mingo@redhat.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/20120723210407.GA25186@shutemov.name
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-07-25 11:49:19 -03:00
Kirill A. Shutemov
4cc49d4dc8
perf tools: use XSI-complaint version of strerror_r() instead of GNU-specific
...
Perf uses GNU-specific version of strerror_r(). The GNU-specific strerror_r()
returns a pointer to a string containing the error message. This may be either
a pointer to a string that the function stores in buf, or a pointer to some
(immutable) static string (in which case buf is unused).
In glibc-2.16 GNU version was marked with attribute warn_unused_result. It
triggers few warnings in perf:
util/target.c: In function ‘perf_target__strerror’:
util/target.c:114:13: error: ignoring return value of ‘strerror_r’, declared with attribute warn_unused_result [-Werror=unused-result]
ui/browsers/hists.c: In function ‘hist_browser__dump’:
ui/browsers/hists.c:981:13: error: ignoring return value of ‘strerror_r’, declared with attribute warn_unused_result [-Werror=unused-result]
They are bugs.
Let's fix strerror_r() usage.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name >
Acked-by: Ulrich Drepper <drepper@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Ulrich Drepper <drepper@gmail.com >
Link: http://lkml.kernel.org/r/20120723210654.GA25248@shutemov.name
[ committer note: s/assert/BUG_ON/g ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-07-25 11:46:04 -03:00
Jovi Zhang
4a841d650e
perf tools: Make the breakpoint events sample period default to 1
...
There have one problem about hw_breakpoint perf event, as watched, the
events reported to userspace is not correctly, sometime one trigger
bp_event report several events, sometime bp_event cannot go through to
user.
The root cause is attr->freq is 1 passed to kernel defaultly in bp
events, this make kernel calculate event period not as expect, make
sample period to 1 will change attr->freq to 0, to fix this problem.
This patch is similar with commit f92128 about tracepoint events:
perf: Make the trace events sample period default to 1
Signed-off-by: Jovi Zhang <bookjovi@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/CACV3sbLF8taiCq_VYW-sgRJyupeMzg58C7ZXfMe3xZUiH_Mx6w@mail.gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-07-25 11:37:46 -03:00
Jiri Olsa
f7add55653
perf test: Add dso data caching tests
...
Adding automated test for DSO data reading. Testing raw/cached reads
from different file/cache locations.
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: 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: Tom Zanussi <tzanussi@gmail.com >
Cc: Ulrich Drepper <drepper@gmail.com >
Link: http://lkml.kernel.org/r/1342959280-5361-18-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-07-25 11:33:17 -03:00
Jiri Olsa
4dff624ae0
perf symbols: Add dso data caching
...
Adding dso data caching so we don't need to open/read/close, each time
we want dso data.
The DSO data caching affects following functions:
dso__data_read_offset
dso__data_read_addr
Each DSO read tries to find the data (based on offset) inside the cache.
If it's not present it fills the cache from file, and returns the data.
If it is present, data are returned with no file read.
Each data read is cached by reading cache page sized/aligned amount of
DSO data. The cache page size is hardcoded to 4096. The cache is using
RB tree with file offset as a sort key.
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: 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: Tom Zanussi <tzanussi@gmail.com >
Cc: Ulrich Drepper <drepper@gmail.com >
Link: http://lkml.kernel.org/r/1342959280-5361-17-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-07-25 11:33:04 -03:00
Jiri Olsa
949d160b69
perf symbols: Add interface to read DSO image data
...
Adding following interface for DSO object to allow
reading of DSO image data:
dso__data_fd
- opens DSO and returns file descriptor
Binary types are used to locate/open DSO in following order:
DSO_BINARY_TYPE__BUILD_ID_CACHE
DSO_BINARY_TYPE__SYSTEM_PATH_DSO
In other word we first try to open DSO build-id path,
and if that fails we try to open DSO system path.
dso__data_read_offset
- reads DSO data from specified offset
dso__data_read_addr
- reads DSO data from specified address/map.
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: 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: Tom Zanussi <tzanussi@gmail.com >
Cc: Ulrich Drepper <drepper@gmail.com >
Link: http://lkml.kernel.org/r/1342959280-5361-11-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2012-07-25 11:32:49 -03:00