Commit 7e90b5c2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull tracing tooling fixes from Steven Rostedt:
 "RTLA:

   - rtla tools are exiting with a positive value when usage() is
     called. Make them return 0 if the usage was called via -h/--help

   - the -P priority sets the sched priority for rtla workload. When the
     SCHED_OTHER scheduler is selected, it sets the rt_priority instead
     of the nice parameter. Setting the nice value is the correct thing,
     so fix it

   - rtla is failing to compile with clang due to unsupported options
     from gcc. Adjusting the compiler/linker options makes clang work
     properly

   - Remove the sched_getattr() unused function on utils.c

   - Fixes for variable initialization and size, reported by clang

  Verification:

   - rv is failing to compile with clang due to unsupported options from
     gcc. Adjusting the compiler/linker options makes clang work
     properly

   - Fix an uninitialized variable on in_kernel.c reported by clang"

* tag 'trace-tools-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tools/rtla: Exit with EXIT_SUCCESS when help is invoked
  tools/rtla: Replace setting prio with nice for SCHED_OTHER
  tools/rv: Fix curr_reactor uninitialized variable
  tools/rv: Fix Makefile compiler options for clang
  tools/rtla: Remove unused sched_getattr() function
  tools/rtla: Fix clang warning about mount_point var size
  tools/rtla: Fix uninitialized bucket/data->bucket_size warning
  tools/rtla: Fix Makefile compiler options for clang
parents c664e16b b5f31936
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -28,10 +28,15 @@ FOPTS := -flto=auto -ffat-lto-objects -fexceptions -fstack-protector-strong \
		-fasynchronous-unwind-tables -fstack-clash-protection
WOPTS	:= 	-Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -Wno-maybe-uninitialized

ifeq ($(CC),clang)
  FOPTS := $(filter-out -ffat-lto-objects, $(FOPTS))
  WOPTS := $(filter-out -Wno-maybe-uninitialized, $(WOPTS))
endif

TRACEFS_HEADERS	:= $$($(PKG_CONFIG) --cflags libtracefs)

CFLAGS	:=	-O -g -DVERSION=\"$(VERSION)\" $(FOPTS) $(MOPTS) $(WOPTS) $(TRACEFS_HEADERS) $(EXTRA_CFLAGS)
LDFLAGS	:=	-ggdb $(EXTRA_LDFLAGS)
LDFLAGS	:=	-flto=auto -ggdb $(EXTRA_LDFLAGS)
LIBS	:=	$$($(PKG_CONFIG) --libs libtracefs)

SRC	:=	$(wildcard src/*.c)
+6 −3
Original line number Diff line number Diff line
@@ -135,7 +135,6 @@ static void osnoise_hist_update_multiple(struct osnoise_tool *tool, int cpu,
	if (params->output_divisor)
		duration = duration / params->output_divisor;

	if (data->bucket_size)
	bucket = duration / data->bucket_size;

	total_duration = duration * count;
@@ -480,7 +479,11 @@ static void osnoise_hist_usage(char *usage)

	for (i = 0; msg[i]; i++)
		fprintf(stderr, "%s\n", msg[i]);
	exit(1);

	if (usage)
		exit(EXIT_FAILURE);

	exit(EXIT_SUCCESS);
}

/*
+5 −1
Original line number Diff line number Diff line
@@ -331,7 +331,11 @@ static void osnoise_top_usage(struct osnoise_top_params *params, char *usage)

	for (i = 0; msg[i]; i++)
		fprintf(stderr, "%s\n", msg[i]);
	exit(1);

	if (usage)
		exit(EXIT_FAILURE);

	exit(EXIT_SUCCESS);
}

/*
+6 −3
Original line number Diff line number Diff line
@@ -178,7 +178,6 @@ timerlat_hist_update(struct osnoise_tool *tool, int cpu,
	if (params->output_divisor)
		latency = latency / params->output_divisor;

	if (data->bucket_size)
	bucket = latency / data->bucket_size;

	if (!context) {
@@ -546,7 +545,11 @@ static void timerlat_hist_usage(char *usage)

	for (i = 0; msg[i]; i++)
		fprintf(stderr, "%s\n", msg[i]);
	exit(1);

	if (usage)
		exit(EXIT_FAILURE);

	exit(EXIT_SUCCESS);
}

/*
+5 −1
Original line number Diff line number Diff line
@@ -375,7 +375,11 @@ static void timerlat_top_usage(char *usage)

	for (i = 0; msg[i]; i++)
		fprintf(stderr, "%s\n", msg[i]);
	exit(1);

	if (usage)
		exit(EXIT_FAILURE);

	exit(EXIT_SUCCESS);
}

/*
Loading