Преглед изворни кода

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

Fixes for some long standing problems.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar пре 13 година
родитељ
комит
136e0b8eab
3 измењених фајлова са 8 додато и 1 уклоњено
  1. 6 0
      tools/perf/bench/mem-memcpy-x86-64-asm.S
  2. 1 1
      tools/perf/util/event.c
  3. 1 0
      tools/perf/util/evsel.c

+ 6 - 0
tools/perf/bench/mem-memcpy-x86-64-asm.S

@@ -1,2 +1,8 @@
 
 #include "../../../arch/x86/lib/memcpy_64.S"
+/*
+ * We need to provide note.GNU-stack section, saying that we want
+ * NOT executable stack. Otherwise the final linking will assume that
+ * the ELF stack should not be restricted at all and set it RWX.
+ */
+.section .note.GNU-stack,"",@progbits

+ 1 - 1
tools/perf/util/event.c

@@ -554,7 +554,7 @@ static int perf_event__process_kernel_mmap(struct perf_tool *tool __used,
 
 	is_kernel_mmap = memcmp(event->mmap.filename,
 				kmmap_prefix,
-				strlen(kmmap_prefix)) == 0;
+				strlen(kmmap_prefix) - 1) == 0;
 	if (event->mmap.filename[0] == '/' ||
 	    (!is_kernel_mmap && event->mmap.filename[0] == '[')) {
 

+ 1 - 0
tools/perf/util/evsel.c

@@ -463,6 +463,7 @@ int perf_event__parse_sample(const union perf_event *event, u64 type,
 	memset(data, 0, sizeof(*data));
 	data->cpu = data->pid = data->tid = -1;
 	data->stream_id = data->id = data->time = -1ULL;
+	data->period = 1;
 
 	if (event->header.type != PERF_RECORD_SAMPLE) {
 		if (!sample_id_all)