Skip to content

Commit

Permalink
Merge tag 'perf-tools-fixes-for-v5.16-2022-01-09' of git://git.kernel…
Browse files Browse the repository at this point in the history
….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
  • Loading branch information
torvalds committed Jan 9, 2022
2 parents df5bc0a + dc9f2dd commit 9a12a5a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion tools/perf/builtin-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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();
Expand Down
19 changes: 0 additions & 19 deletions tools/perf/util/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 9a12a5a

Please sign in to comment.