提交 600a8cf4 编写于 作者: J Jiri Olsa 提交者: Arnaldo Carvalho de Melo

perf c2c report: Add header macros

Adding helping macros to define header objects.  It will be used in
following patches, that add new dimensions.

The c2c report will support 2 line headers, hence we only define
line[0/1] in macros.
Signed-off-by: NJiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Joe Mario <jmario@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1474558645-19956-20-git-send-email-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 b2252ae6
......@@ -273,6 +273,41 @@ static int c2c_header(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp,
return scnprintf(hpp->buf, hpp->size, "%*s", width, text);
}
#define HEADER_LOW(__h) \
{ \
.line[1] = { \
.text = __h, \
}, \
}
#define HEADER_BOTH(__h0, __h1) \
{ \
.line[0] = { \
.text = __h0, \
}, \
.line[1] = { \
.text = __h1, \
}, \
}
#define HEADER_SPAN(__h0, __h1, __s) \
{ \
.line[0] = { \
.text = __h0, \
.span = __s, \
}, \
.line[1] = { \
.text = __h1, \
}, \
}
#define HEADER_SPAN_LOW(__h) \
{ \
.line[1] = { \
.text = __h, \
}, \
}
static struct c2c_dimension *dimensions[] = {
NULL,
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册