perf tools: Save column length in perf_hpp_fmt
Save column length in the hpp format and pass it to print functions. This is a preparation for users to control column width in the output. Signed-off-by: Namhyung Kim <namhyung@kernel.org> 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/1406785662-5534-4-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
d675107ce6
commit
e0d66c74b0
4 changed files with 94 additions and 48 deletions
|
@ -207,6 +207,7 @@ struct perf_hpp_fmt {
|
|||
struct list_head list;
|
||||
struct list_head sort_list;
|
||||
bool elide;
|
||||
int len;
|
||||
};
|
||||
|
||||
extern struct list_head perf_hpp__list;
|
||||
|
@ -261,6 +262,7 @@ static inline bool perf_hpp__should_skip(struct perf_hpp_fmt *format)
|
|||
}
|
||||
|
||||
void perf_hpp__reset_width(struct perf_hpp_fmt *fmt, struct hists *hists);
|
||||
void perf_hpp__reset_sort_width(struct perf_hpp_fmt *fmt, struct hists *hists);
|
||||
|
||||
typedef u64 (*hpp_field_fn)(struct hist_entry *he);
|
||||
typedef int (*hpp_callback_fn)(struct perf_hpp *hpp, bool front);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue