Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e06d4f0 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge tag 'perf-urgent-for-mingo-4.10-20170104' of...

Merge tag 'perf-urgent-for-mingo-4.10-20170104' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

 into perf/urgent

Pull perf/urgent fixes and one improvement from Arnaldo Carvalho de Melo:

Fixes:

  - Fix prev/next_prio formatting for deadline tasks in libtraceevent (Daniel Bristot de Oliveira)

  - Robustify reading of build-ids from /sys/kernel/note (Arnaldo Carvalho de Melo)

  - Fix building some sample/bpf in Alpine Linux 3.4 (Arnaldo Carvalho de Melo)

  - Fix 'make install-bin' to install libtraceevent plugins (Arnaldo Carvalho de Melo)

  - Fix 'perf record --switch-output' documentation and comment (Jiri Olsa)

  - Fix 'perf probe' for cross arch probing (Masami Hiramatsu)

Improvement:

  - Show total scheduling time in 'perf sched timehist' (Namhyumg Kim)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parents 0c744ea4 8a937a25
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <net/ethernet.h>
#include <linux/if_ether.h>
#include <net/if.h>
#include <linux/if_packet.h>
#include <arpa/inet.h>
+0 −1
Original line number Diff line number Diff line
@@ -9,7 +9,6 @@
#include <string.h>
#include <fcntl.h>
#include <poll.h>
#include <sys/ioctl.h>
#include <linux/perf_event.h>
#include <linux/bpf.h>
#include <errno.h>
+3 −0
Original line number Diff line number Diff line
@@ -213,6 +213,9 @@ static int get_value(struct parse_opt_ctx_t *p,
		else
			err = get_arg(p, opt, flags, (const char **)opt->value);

		if (opt->set)
			*(bool *)opt->set = true;

		/* PARSE_OPT_NOEMPTY: Allow NULL but disallow empty string. */
		if (opt->flags & PARSE_OPT_NOEMPTY) {
			const char *val = *(const char **)opt->value;
+5 −0
Original line number Diff line number Diff line
@@ -137,6 +137,11 @@ struct option {
	{ .type = OPTION_STRING,  .short_name = (s), .long_name = (l), \
	  .value = check_vtype(v, const char **), (a), .help = (h), \
	  .flags = PARSE_OPT_OPTARG, .defval = (intptr_t)(d) }
#define OPT_STRING_OPTARG_SET(s, l, v, os, a, h, d) \
	{ .type = OPTION_STRING, .short_name = (s), .long_name = (l), \
	  .value = check_vtype(v, const char **), (a), .help = (h), \
	  .flags = PARSE_OPT_OPTARG, .defval = (intptr_t)(d), \
	  .set = check_vtype(os, bool *)}
#define OPT_STRING_NOEMPTY(s, l, v, a, h)   { .type = OPTION_STRING,  .short_name = (s), .long_name = (l), .value = check_vtype(v, const char **), (a), .help = (h), .flags = PARSE_OPT_NOEMPTY}
#define OPT_DATE(s, l, v, h) \
	{ .type = OPTION_CALLBACK, .short_name = (s), .long_name = (l), .value = (v), .argh = "time", .help = (h), .callback = parse_opt_approxidate_cb }
+2 −2
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ static int sched_switch_handler(struct trace_seq *s,
	trace_seq_printf(s, "%lld ", val);

	if (pevent_get_field_val(s, event, "prev_prio", record, &val, 0) == 0)
		trace_seq_printf(s, "[%lld] ", val);
		trace_seq_printf(s, "[%d] ", (int) val);

	if (pevent_get_field_val(s,  event, "prev_state", record, &val, 0) == 0)
		write_state(s, val);
@@ -129,7 +129,7 @@ static int sched_switch_handler(struct trace_seq *s,
	trace_seq_printf(s, "%lld", val);

	if (pevent_get_field_val(s, event, "next_prio", record, &val, 0) == 0)
		trace_seq_printf(s, " [%lld]", val);
		trace_seq_printf(s, " [%d]", (int) val);

	return 0;
}
Loading