perf tools fixes for v5.16: 6th batch
- Revert "libtraceevent: Increase libtraceevent logging when verbose", breaks the build with libtraceevent-1.3.0, i.e. when building with 'LIBTRACEEVENT_DYNAMIC=1'. - Avoid early exit in 'perf trace' due to running SIGCHLD handler before it makes sense to. It can happen when using a BPF source code event that have to be first built into an object file. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQR2GiIUctdOfX2qHhGyPKLppCJ+JwUCYdrrXQAKCRCyPKLppCJ+ J1KLAPwKLu7Mxj5sc0EMB3WJr48PUTaAzNt9GYhfxuok3x6bBgEAvXQL5olib/0A 9sLhZrKVHqeQKApgFtkzOVT6DoNVwwg= =0r49 -----END PGP SIGNATURE----- Merge tag 'perf-tools-fixes-for-v5.16-2022-01-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Revert "libtraceevent: Increase libtraceevent logging when verbose", breaks the build with libtraceevent-1.3.0, i.e. when building with 'LIBTRACEEVENT_DYNAMIC=1'. - Avoid early exit in 'perf trace' due to running SIGCHLD handler before it makes sense to. It can happen when using a BPF source code event that have to be first built into an object file. * tag 'perf-tools-fixes-for-v5.16-2022-01-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: Revert "libtraceevent: Increase libtraceevent logging when verbose" perf trace: Avoid early exit due to running SIGCHLD handler before it makes sense to
This commit is contained in:
commit
9a12a5aa17
@ -3925,6 +3925,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
|
||||
bool draining = false;
|
||||
|
||||
trace->live = true;
|
||||
signal(SIGCHLD, sig_handler);
|
||||
|
||||
if (!trace->raw_augmented_syscalls) {
|
||||
if (trace->trace_syscalls && trace__add_syscall_newtp(trace))
|
||||
@ -4873,7 +4874,6 @@ int cmd_trace(int argc, const char **argv)
|
||||
|
||||
signal(SIGSEGV, sighandler_dump_stack);
|
||||
signal(SIGFPE, sighandler_dump_stack);
|
||||
signal(SIGCHLD, sig_handler);
|
||||
signal(SIGINT, sig_handler);
|
||||
|
||||
trace.evlist = evlist__new();
|
||||
|
@ -24,16 +24,6 @@
|
||||
#include "util/parse-sublevel-options.h"
|
||||
|
||||
#include <linux/ctype.h>
|
||||
#include <traceevent/event-parse.h>
|
||||
|
||||
#define MAKE_LIBTRACEEVENT_VERSION(a, b, c) ((a)*255*255+(b)*255+(c))
|
||||
#ifndef LIBTRACEEVENT_VERSION
|
||||
/*
|
||||
* If LIBTRACEEVENT_VERSION wasn't computed then set to version 1.1.0 that ships
|
||||
* with the Linux kernel tools.
|
||||
*/
|
||||
#define LIBTRACEEVENT_VERSION MAKE_LIBTRACEEVENT_VERSION(1, 1, 0)
|
||||
#endif
|
||||
|
||||
int verbose;
|
||||
int debug_peo_args;
|
||||
@ -238,15 +228,6 @@ int perf_debug_option(const char *str)
|
||||
/* Allow only verbose value in range (0, 10), otherwise set 0. */
|
||||
verbose = (verbose < 0) || (verbose > 10) ? 0 : verbose;
|
||||
|
||||
#if MAKE_LIBTRACEEVENT_VERSION(1, 3, 0) <= LIBTRACEEVENT_VERSION
|
||||
if (verbose == 1)
|
||||
tep_set_loglevel(TEP_LOG_INFO);
|
||||
else if (verbose == 2)
|
||||
tep_set_loglevel(TEP_LOG_DEBUG);
|
||||
else if (verbose >= 3)
|
||||
tep_set_loglevel(TEP_LOG_ALL);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user