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

Commit 6eedf416 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge tag 'perf-core-for-mingo' of...

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

 into perf/urgent

Pull perf/core improvements and refactorings from Arnaldo Carvalho de Melo:

Infrastructure changes:

  - Reference count the cpu_map and thread_map classes. (Jiri Olsa)

  - Set evsel->{cpus,threads} from the evlist, if not set,
    allowing the generalization of some 'perf stat' functions that
    previously were accessing private static evlist variable. (Jiri Olsa)

  - Delete an unnecessary check before the calling
    free_event_desc() (Markus Elfring)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents df0d0da4 a22e99cd
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -141,16 +141,6 @@ static inline void diff_timespec(struct timespec *r, struct timespec *a,
	}
}

static inline struct cpu_map *perf_evsel__cpus(struct perf_evsel *evsel)
{
	return (evsel->cpus && !target.cpu_list) ? evsel->cpus : evsel_list->cpus;
}

static inline int perf_evsel__nr_cpus(struct perf_evsel *evsel)
{
	return perf_evsel__cpus(evsel)->nr;
}

static void perf_evsel__reset_stat_priv(struct perf_evsel *evsel)
{
	int i;
+2 −2
Original line number Diff line number Diff line
@@ -545,8 +545,8 @@ static int do_test_code_reading(bool try_kcore)
	if (evlist) {
		perf_evlist__delete(evlist);
	} else {
		cpu_map__delete(cpus);
		thread_map__delete(threads);
		cpu_map__put(cpus);
		thread_map__put(threads);
	}
	machines__destroy_kernel_maps(&machines);
	machine__delete_threads(machine);
+2 −2
Original line number Diff line number Diff line
@@ -144,8 +144,8 @@ int test__keep_tracking(void)
		perf_evlist__disable(evlist);
		perf_evlist__delete(evlist);
	} else {
		cpu_map__delete(cpus);
		thread_map__delete(threads);
		cpu_map__put(cpus);
		thread_map__put(threads);
	}

	return err;
+2 −2
Original line number Diff line number Diff line
@@ -140,8 +140,8 @@ int test__basic_mmap(void)
	cpus	= NULL;
	threads = NULL;
out_free_cpus:
	cpu_map__delete(cpus);
	cpu_map__put(cpus);
out_free_threads:
	thread_map__delete(threads);
	thread_map__put(threads);
	return err;
}
+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ static int synth_process(struct machine *machine)
						perf_event__process,
						machine, 0, 500);

	thread_map__delete(map);
	thread_map__put(map);
	return err;
}

Loading