perf tools: Add callback function to hist_entry_iter
The new ->add_entry_cb() will be called after an entry was added to the histogram. It's used for code sharing between perf report and perf top. Note that ops->add_*_entry() should set iter->he properly in order to call the ->add_entry_cb. Also pass @arg to the callback function. It'll be used by perf top later. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arun Sharma <asharma@fb.com> Tested-by: Rodrigo Campos <rodrigo@sdfg.com.ar> Cc: Frederic Weisbecker <fweisbec@gmail.com> Link: http://lkml.kernel.org/r/87k393g999.fsf@sejong.aot.lge.com Signed-off-by: Jiri Olsa <jolsa@kernel.org>
这个提交包含在:
@@ -71,7 +71,7 @@ static int add_hist_entries(struct hists *hists, struct machine *machine)
|
||||
goto out;
|
||||
|
||||
if (hist_entry_iter__add(&iter, &al, evsel, &sample,
|
||||
PERF_MAX_STACK_DEPTH) < 0)
|
||||
PERF_MAX_STACK_DEPTH, NULL) < 0)
|
||||
goto out;
|
||||
|
||||
fake_samples[i].thread = al.thread;
|
||||
|
在新工单中引用
屏蔽一个用户