Commit 9a12a5aa authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'perf-tools-fixes-for-v5.16-2022-01-09' of...

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
parents df5bc0aa dc9f2dd5
...@@ -3925,6 +3925,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv) ...@@ -3925,6 +3925,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
bool draining = false; bool draining = false;
trace->live = true; trace->live = true;
signal(SIGCHLD, sig_handler);
if (!trace->raw_augmented_syscalls) { if (!trace->raw_augmented_syscalls) {
if (trace->trace_syscalls && trace__add_syscall_newtp(trace)) if (trace->trace_syscalls && trace__add_syscall_newtp(trace))
...@@ -4873,7 +4874,6 @@ int cmd_trace(int argc, const char **argv) ...@@ -4873,7 +4874,6 @@ int cmd_trace(int argc, const char **argv)
signal(SIGSEGV, sighandler_dump_stack); signal(SIGSEGV, sighandler_dump_stack);
signal(SIGFPE, sighandler_dump_stack); signal(SIGFPE, sighandler_dump_stack);
signal(SIGCHLD, sig_handler);
signal(SIGINT, sig_handler); signal(SIGINT, sig_handler);
trace.evlist = evlist__new(); trace.evlist = evlist__new();
......
...@@ -24,16 +24,6 @@ ...@@ -24,16 +24,6 @@
#include "util/parse-sublevel-options.h" #include "util/parse-sublevel-options.h"
#include <linux/ctype.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 verbose;
int debug_peo_args; int debug_peo_args;
...@@ -238,15 +228,6 @@ int perf_debug_option(const char *str) ...@@ -238,15 +228,6 @@ int perf_debug_option(const char *str)
/* Allow only verbose value in range (0, 10), otherwise set 0. */ /* Allow only verbose value in range (0, 10), otherwise set 0. */
verbose = (verbose < 0) || (verbose > 10) ? 0 : verbose; 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; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment