perf ui hists: Pass evsel to hpp->header/width functions explicitly
Those functions need evsel to investigate event group and it's passed via hpp->ptr. However as it can be missed easily so it's better to pass it via an argument IMHO. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Andi Kleen <andi@firstfloor.org> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1394437440-11609-2-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
此提交包含在:
@@ -379,7 +379,6 @@ size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows,
|
||||
struct perf_hpp dummy_hpp = {
|
||||
.buf = bf,
|
||||
.size = sizeof(bf),
|
||||
.ptr = hists_to_evsel(hists),
|
||||
};
|
||||
bool first = true;
|
||||
size_t linesz;
|
||||
@@ -398,7 +397,7 @@ size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows,
|
||||
else
|
||||
first = false;
|
||||
|
||||
fmt->header(fmt, &dummy_hpp);
|
||||
fmt->header(fmt, &dummy_hpp, hists_to_evsel(hists));
|
||||
fprintf(fp, "%s", bf);
|
||||
}
|
||||
|
||||
@@ -443,7 +442,7 @@ size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows,
|
||||
else
|
||||
first = false;
|
||||
|
||||
width = fmt->width(fmt, &dummy_hpp);
|
||||
width = fmt->width(fmt, &dummy_hpp, hists_to_evsel(hists));
|
||||
for (i = 0; i < width; i++)
|
||||
fprintf(fp, ".");
|
||||
}
|
||||
|
新增問題並參考
封鎖使用者