27 Aug, 2013
1 commit
-
Getting rid of:
make[1]: Entering directory `/home/git/linux/tools/lib/traceevent'
make[2]: warning: jobserver unavailable: using -j1. Add `+' to parent
make rule.
make[1]: Entering directory `/home/git/linux/tools/lib/lkWhen running:
make -j4 O=/tmp/build/perf -C tools/perf install-bin
Acked-by: Borislav Petkov
Cc: Adrian Hunter
Cc: Borislav Petkov
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Steven Rostedt
Link: http://lkml.kernel.org/n/tip-pvr7uppe329gw9onchgdu0m6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
08 Aug, 2013
1 commit
-
This reverts commit 079787f209416416383c74ea5d5044be2d586f5e.
Below commit already resolve a cross build problem.
I have been noticed this too lately.commit 3c4797d46c14fa0c7cf733a77bd4b28875078b53
Author: Rabin Vincent
Date: Fri May 17 22:27:44 2013 +0200tools lib lk: Respect CROSS_COMPILE
Make lk use CROSS_COMPILE, in order to be able to cross compile perf
again.Signed-off-by: Joonsoo Kim
Cc: Ingo Molnar
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1373936614-22224-1-git-send-email-iamjoonsoo.kim@lge.com
Signed-off-by: Arnaldo Carvalho de Melo
13 Jul, 2013
6 commits
-
kbuffer code is for parsing ftrace ring-buffer binary data and used
for trace-cmd. Move the code here in order to be used more widely.Signed-off-by: Namhyung Kim
Original-patch-by: Steven Rostedt
Acked-by: Steven Rostedt
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1370323231-14022-7-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
The page size of traced system can be different than current system's
because the recorded data file might be analyzed in a different machine.
In this case we should use original page size of traced system when
accessing the data file, so this information needs to be saved.Signed-off-by: Namhyung Kim
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1370323231-14022-6-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Sometimes it'd be useful if existing trace_seq can be reused. But
currently it's impossible since there's no API to reset the trace_seq.
Let's add trace_seq_reset() for this case.Signed-off-by: Namhyung Kim
Acked-by: Steven Rostedt
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1370323231-14022-5-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
If pevent_register_event_handler() received a string literal as
@sys_name or @event_name parameter, it emitted a warning about const
qualifier removal. Since they're not modified in the function we can
make it have const qualifier.Signed-off-by: Namhyung Kim
Acked-by: Steven Rostedt
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1370323231-14022-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
It's came from trace-cmd's kernelshark which is not a part of
libtraceevent.Signed-off-by: Namhyung Kim
Acked-by: Steven Rostedt
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1370323231-14022-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
The html_install, img_install, install_plugin and install_python are
unused in the Makefile. Get rid of them.Signed-off-by: Namhyung Kim
Acked-by: Steven Rostedt
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1370323231-14022-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
11 Jul, 2013
1 commit
-
Since libelf sometimes uses libpthread, we have to list that after -lelf
when someone tries to build statically. Else things go boom:Makefile:479: *** No libelf.h/libelf found, please install \
libelf-dev/elfutils-libelf-devel. Stop.Similarly, the -ldw test fails as it often uses -lz:
Makefile:462: No libdw.h found or old libdw.h found or elfutils is older \
than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-devAnd if we add debugging to try-cc, we see:
+ echo '#includeint main(void)
{
Dwarf *dbg = dwarf_begin(0, DWARF_C_READ);
return (long)dbg;
}'
+ i686-pc-linux-gnu-gcc -x c - -O2 -pipe -march=atom -mtune=atom -mfpmath=sse -g \
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE \
-ldw -lelf -static -lpthread -lrt -lelf -lm -o .24368
/usr/lib/libdw.a(dwarf_begin_elf.o):function check_section.isra.1: error: undefined reference to 'inflateInit_'
/usr/lib/libdw.a(dwarf_begin_elf.o):function check_section.isra.1: error: undefined reference to 'inflate'
/usr/lib/libdw.a(dwarf_begin_elf.o):function check_section.isra.1: error: undefined reference to 'inflateReset'
/usr/lib/libdw.a(dwarf_begin_elf.o):function check_section.isra.1: error: undefined reference to 'inflateEnd'+ echo '#include
int main(void)
{
Elf *elf = elf_begin(0, ELF_C_READ, 0);
return (long)elf;
}'
+ i686-pc-linux-gnu-gcc -x c - -O2 -pipe -march=atom -mtune=atom -mfpmath=sse -g \
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE \
-static -lpthread -lrt -lelf -lm -o .19216
/usr/lib/libelf.a(elf_begin.o):function file_read_elf: error: undefined reference to 'pthread_rwlock_init'
/usr/lib/libelf.a(elf_begin.o):function __libelf_read_mmaped_file: error: undefined reference to 'pthread_rwlock_init'
/usr/lib/libelf.a(elf_begin.o):function __libelf_read_mmaped_file: error: undefined reference to 'pthread_rwlock_init'
/usr/lib/libelf.a(elf_begin.o):function read_file: error: undefined reference to 'pthread_rwlock_init'
/usr/lib/libelf.a(elf_begin.o):function lock_dup_elf.8072: error: undefined reference to 'pthread_rwlock_unlock'
/usr/lib/libelf.a(elf_begin.o):function lock_dup_elf.8072: error: undefined reference to 'pthread_rwlock_wrlock'
/usr/lib/libelf.a(elf_begin.o):function elf_begin: error: undefined reference to 'pthread_rwlock_rdlock'
/usr/lib/libelf.a(elf_begin.o):function elf_begin: error: undefined reference to 'pthread_rwlock_unlock'Signed-off-by: Mike Frysinger
Cc: Ingo Molnar
Cc: Paul Mackerras
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1368073064-18276-1-git-send-email-vapier@gentoo.org
Signed-off-by: Arnaldo Carvalho de Melo
09 Jul, 2013
1 commit
-
Currently, lib lk doesn't use CROSS_COMPILE environment variable, so
cross build always fails.This is a quick fix for this problem.
Signed-off-by: Joonsoo Kim
Cc: Ingo Molnar
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1371603750-15053-2-git-send-email-iamjoonsoo.kim@lge.com
Signed-off-by: Arnaldo Carvalho de Melo
29 May, 2013
1 commit
-
Make lk use CROSS_COMPILE, in order to be able to cross compile perf
again.Signed-off-by: Rabin Vincent
Cc: Ingo Molnar
Cc: Borislav Petkov
Link: http://lkml.kernel.org/r/1368822464-4887-1-git-send-email-rabin@rab.in
Signed-off-by: Arnaldo Carvalho de Melo
16 Mar, 2013
3 commits
-
Jiri Olsa triggers the following build error:
SUBDIR ../lib/lk/
CC debugfs.o
In file included from /usr/include/errno.h:29:0,
from debugfs.c:1:
/usr/include/features.h:314:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]This is because enabling buffer overflow checks through _FORTIFY_SOURCE
require compiler optimizations to be enabled too. However, those are
not. Enable them by simply copying the perf optimization level. It can
be expanded later if we want to support debug builds, etc.Signed-off-by: Borislav Petkov
Reported-by: Jiri Olsa
Link: http://lkml.kernel.org/r/1362338733-8718-1-git-send-email-bp@alien8.de
Signed-off-by: Arnaldo Carvalho de Melo -
Move them to util.c and simplify code a bit.
Signed-off-by: Borislav Petkov
Cc: Ingo Molnar
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1361374353-30385-6-git-send-email-bp@alien8.de
Signed-off-by: Arnaldo Carvalho de Melo -
This introduces the tools/lib/lk library, that will gradually have the
routines that now are used in tools/perf/ and other tools and that can
be shared.Start by carving out debugfs routines for general use.
Signed-off-by: Borislav Petkov
Cc: Ingo Molnar
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1361374353-30385-5-git-send-email-bp@alien8.de
[ committer note: Add tools/lib/lk/ to perf's MANIFEST so that its tarballs continue to build ]
Signed-off-by: Arnaldo Carvalho de Melo
14 Mar, 2013
1 commit
-
having /usr/local/include hardcoded into the makefile is not necessary
as this is automatically included by GCC. It also infects cross-compile
builds with the host systems includes.Signed-off-by: Jack Mitchell
Acked-by: Namhyung Kim
Cc: Ingo Molnar
Cc: Paul Mackerras
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1362741712-21308-1-git-send-email-ml@communistcode.co.uk
Signed-off-by: Arnaldo Carvalho de Melo
25 Jan, 2013
6 commits
-
Fixing the dynamic array format field parsing.
Currently the event_read_fields function could segfault while parsing
dynamic array other than string type. The reason is the event->pevent
does not need to be set and gets dereferenced unconditionaly.Also adding proper initialization of field->elementsize based on the
parsed dynamic type.Signed-off-by: Jiri Olsa
Acked-by: Steven Rostedt
Cc: Corey Ashford
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1359060403-32422-1-git-send-email-jolsa@redhat.com
[ committer note: Made a char pointer parameter const, as requested by Steven ]
Signed-off-by: Arnaldo Carvalho de Melo -
For some reason the libtraceevent tracepoint-parsing code is missing
the FIELD_IS_SIGNED flag-setting code, which causes problems for the
Perl trace event binding at least, since it ends up unable to
recognize negative numbers.Things like checking for negative return values therefore fail, causing
scripts like rwtop to instead interpret the negative return value as a
large positive value, which in turn get added to e.g. read totals with
insanely invalid results.So set the FIELD_IS_SIGNED flag for tracepoint events that specify
"signed:1".Before:
# perf script record rw-by-pid
# perf script report rw-by-pidread counts by pid:
pid comm # reads bytes_requested bytes_read
------ -------------------- ----------- ---------- ----------
753 Xorg 88 512000 7.74763251095801e+20
1619 firefox 42 462 2.58254417031934e+20
1232 gnome-shell 11 176 1.10680464442257e+20
1471 gnome-terminal 3 16366 18446744073709551615
1408 libsocialweb-co 2 32 18446744073709551613After:
# perf script report rw-by-pid
read counts by pid:
pid comm # reads bytes_requested bytes_read
------ -------------------- ----------- ---------- ----------
753 Xorg 88 512000 2764
1619 firefox 42 462 126
1232 gnome-shell 11 176 40
1471 gnome-terminal 3 16366 10
1408 libsocialweb-co 2 32 8Signed-off-by: Tom Zanussi
Link: http://lkml.kernel.org/r/1471b5968821a455cf5168bb4567964e74ecf530.1358527965.git.tom.zanussi@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo -
Although the '>=' (and '='
Warning: unknown op '>='
Warning: unknown op '>='
Warning: unknown op '>='
Warning: unknown op '>='
Warning: unknown op '>='
...Add the operator to the checks.
Signed-off-by: Namhyung Kim
Acked-by: Steven Rostedt
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1358236939-17393-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Adding a missing copyright header to parse-utils.c. Assuminng that the
license is LGPL like the rest of the trace-cmd library code.Signed-off-by: Jon Stanley
Acked-by: Steven Rostedt
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1347127251-4695-1-git-send-email-jonstanley@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo -
The FSF now prefers to use URL's in copyright headers rather than
their postal address. This change updates the address to be
per http://www.gnu.org/licenses/gpl-howto.htmlSigned-off-by: Jon Stanley
Acked-by: Steven Rostedt
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1347049967-3143-1-git-send-email-jonstanley@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo -
we've tested the wrong variable for allocation failure, fix it to
test the right one.Cc: Frederic Weisbecker
Cc: Namhyung Kim
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1356120062-2648-1-git-send-email-sasha.levin@oracle.com
Signed-off-by: Sasha Levin
Signed-off-by: Arnaldo Carvalho de Melo
10 Nov, 2012
5 commits
-
Fixing the build on fedora 14, 32-bit:
tools/lib/traceevent/event-parse.c: In function ‘find_cmdline’:
tools/lib/traceevent/event-parse.c:183:3: error: return discards qualifiers from pointer target type
tools/lib/traceevent/event-parse.c:186:3: error: return discards qualifiers from pointer target type
tools/lib/traceevent/event-parse.c:195:2: error: return discards qualifiers from pointer target type
tools/lib/traceevent/event-parse.c: In function ‘process_func_handler’:
tools/lib/traceevent/event-parse.c:2658:9: error: assignment discards qualifiers from pointer target type
tools/lib/traceevent/event-parse.c:2660:9: error: assignment discards qualifiers from pointer target type
tools/lib/traceevent/event-parse.c: In function ‘print_mac_arg’:
tools/lib/traceevent/event-parse.c:3892:14: error: initialization discards qualifiers from pointer target type
tools/lib/traceevent/event-parse.c:3906:7: error: assignment discards qualifiers from pointer target type
tools/lib/traceevent/event-parse.c: In function ‘pevent_print_event’:
tools/lib/traceevent/event-parse.c:4412:24: error: initialization discards qualifiers from pointer target typeCc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Steven Rostedt
Link: http://lkml.kernel.org/n/tip-0k5g8urwu7vwkgbcbt2x05fe@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
gcc on f14 32-bit rightly complains:
tools/lib/traceevent/event-parse.c:5097:2: error: enumeration value ‘PEVENT_ERRNO__INVALID_ARG_TYPE’ not handled in switch
The entry for it is in the error strings array pevent_error_str[]:
_PE(INVALID_ARG_TYPE, "invalid argument type")
It was just not being handled on the pevent_strerror switch, fix it.
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Steven Rostedt
Link: http://lkml.kernel.org/n/tip-c68zkvxw4289uqbosfkz963g@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
gcc on f14 32-bit complains:
tools/lib/traceevent/event-parse.c: In function ‘pevent_register_print_function’:
tools/lib/traceevent/event-parse.c:5366:3: error: comparison of unsigned expression < 0 is always falseThis is because:
enum pevent_func_arg_type type;
this enum doesn't have any negative value, so gcc makes it an 'unsigned
int'. Fix it by removing the < 0 test.Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Steven Rostedt
Link: http://lkml.kernel.org/n/tip-6vnd6ud6fbpn48zax4a5ru01@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Fixing this warning-as-error on f14 32-bit:
tools/lib/traceevent/event-parse.c:5564:17: error: comparison between signed and unsigned integer expressions
tools/lib/traceevent/event-parse.c:5586:17: error: comparison between signed and unsigned integer expressionsCc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Steven Rostedt
Link: http://lkml.kernel.org/n/tip-stmix8hy4nu5ervpynn8yj2z@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Fixing the build on 32-bit Fedora 14:
tools/lib/traceevent/event-parse.c: In function ‘print_event_fields’:
tools/lib/traceevent/event-parse.c:3934:69: error: unused parameter ‘size’
tools/lib/traceevent/event-parse.c: In function ‘pevent_strerror’:
tools/lib/traceevent/event-parse.c:5074:36: error: unused parameter ‘pevent’Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Steven Rostedt
Link: http://lkml.kernel.org/n/tip-soe4gqcz8fd4ecik6exvyqox@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
26 Oct, 2012
1 commit
-
Ingo reported (again!) that 'make clean' on perf/traceevent does not
work due to some reason with system header file. Quotes Ingo:"Note that the old dependency related build failure thought to be
fixed in commit 860df5833e46 is back:make[1]: *** No rule to make target
`/usr/lib/gcc/x86_64-redhat-linux/4.7.0/include/stddef.h', needed by `.trace-seq.d'. Stop.'make clean' itself does not work in libtraceevent:
comet:~/tip/tools/lib/traceevent> make clean
make: *** No rule to make target `/usr/lib/gcc/x86_64-redhat-linux/4.7.0/include/stddef.h', needed by `.trace-seq.d'. Stop.So I had to clean it out manually:
comet:~/tip/tools/lib/traceevent> git ls-files --others | xargs rm
comet:~/tip/tools/lib/traceevent>and then things build fine."
Try to fix it by excluding system headers from dependency generation.
Signed-off-by: Namhyung Kim
Reported-by: Ingo Molnar
Cc: Borislav Petkov
Cc: Ingo Molnar
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1351241752-2919-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
17 Oct, 2012
2 commits
-
Some of args were missed in free_args(), as well as subargs.
That is args like FILTER_ARG_NUM have left and right pointers to other
args that also need to be freed.Signed-off-by: Steven Rostedt
Cc: Ingo Molnar
Cc: Namhyung Kim
Link: http://lkml.kernel.org/r/1349137408.22822.135.camel@gandalf.local.home
Signed-off-by: Arnaldo Carvalho de Melo -
Even though with the change of commit commit 2b29175 "tools lib
traceevent: Carve out events format parsing routine", allowed
__pevent_parse_format() to parse an event without the need of a pevent
handler, the event still needs to assign the pevent handed to it.There's no problem with assigning it if the pevent is NULL, as the
event->pevent would be NULL without the assignment. But function parsing
handlers may be assigned to the pevent handler to help in parsing the
event. If there's no pevent then there would not be any function
handlers, but if the pevent isn't assigned first before parsing the
event, it wont honor the function handlers that were assigned.Worse yet, the current code crashes if an event has a function that it
tries to parse. For example:# perf record -e scsi:scsi_dispatch_cmd_timeout
Segmentation fault (core dumped)This happens because the scsi_dispatch_cmd_timeout event format has the following:
scsi_trace_parse_cdb(p, __get_dynamic_array(cmnd), REC->cmd_len)
which hasn't been defined by the pevent code.
Signed-off-by: Steven Rostedt
Reviewed-by: Namhyung Kim
Cc: Ingo Molnar
Cc: Namhyung Kim
Link: http://lkml.kernel.org/r/1349136831.22822.133.camel@gandalf.local.home
Signed-off-by: Arnaldo Carvalho de Melo
25 Sep, 2012
1 commit
-
If __pevent_parse_format() succeeded but add_event() failed, 'ret' didn't
have a proper error code. Set it to PEVENT_ERRNO__MEM_ALLOC_FAILED.In addition, at that point 'event' also has fields and format
information and they all need to be freed. Call pevent_free_format() to
handle it.Signed-off-by: Namhyung Kim
Cc: Ingo Molnar
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1348575919-4954-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
24 Sep, 2012
10 commits
-
Now alloc_arg returns NULL if memory allocation failed, it should be
handled on callsites properly.Signed-off-by: Namhyung Kim
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Mike Galbraith
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/87k3vpzbqo.fsf_-_@sejong.aot.lge.com
Signed-off-by: Arnaldo Carvalho de Melo -
The pevent_parse_event() routine will parse a events/sys/tp/format file
and add an event_format instance to the pevent struct.This patch introduces a pevent_parse_format() routine with just the bits
needed to parse the event/sys/tp/format file and just return the
event_format instance, useful for when all we want is to parse the
format file, without requiring the pevent struct.Acked-by: Steven Rostedt
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Mike Galbraith
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Steven Rostedt
Link: http://lkml.kernel.org/n/tip-lge0afl47arh86om0m6a5bqr@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Cleaned event-parse.c this time, just propagate the errors and in handle
them the call sites.Reviewed-by: Namhyung Kim
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Mike Galbraith
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Steven Rostedt
Link: http://lkml.kernel.org/n/tip-9ebpr2vgfk2qs2841i99sa8y@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Instead of dying, just use do_warning and let the goto that is there to
take place.Reviewed-by: Namhyung Kim
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Mike Galbraith
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Steven Rostedt
Link: http://lkml.kernel.org/n/tip-aoaus46ngnt9oc2pt7ckot5d@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Replacing the equivalent open coded malloc + memset bits.
Reviewed-by: Namhyung Kim
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Mike Galbraith
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Steven Rostedt
Link: http://lkml.kernel.org/n/tip-598fjtjbzal4wxh7fp0yv0q1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Replacing the equivalent open coded malloc + sprintf bits.
Reviewed-by: Namhyung Kim
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Mike Galbraith
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Steven Rostedt
Link: http://lkml.kernel.org/n/tip-ghokwtdw2hgmmmn7oa9s03r4@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
The field should be freed on error paths.
Signed-off-by: Namhyung Kim
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Peter Zijlstra
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1348037924-17568-5-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
The field should be freed on error paths.
Signed-off-by: Namhyung Kim
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Peter Zijlstra
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1348037924-17568-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
When process_op failed, @arg will be freed on a caller with type of
PRINT_OP. Thus free_arg() will try to free ->op.right field which can
have stale value if something bad happens in the middle.Signed-off-by: Namhyung Kim
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Peter Zijlstra
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1348037924-17568-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
free_token() under out_free should be called with 'token' and no need
to set *tok to NULL since it's set already.Signed-off-by: Namhyung Kim
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Peter Zijlstra
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1348037924-17568-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo