aboutsummaryrefslogtreecommitdiffstats
path: root/parse-events.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse-events.c')
-rw-r--r--parse-events.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/parse-events.c b/parse-events.c
index 30d3ea0..0600973 100644
--- a/parse-events.c
+++ b/parse-events.c
@@ -3536,13 +3536,15 @@ static void parse_header_field(const char *field,
3536 * @pevent: the handle to the pevent 3536 * @pevent: the handle to the pevent
3537 * @buf: the buffer storing the header page format string 3537 * @buf: the buffer storing the header page format string
3538 * @size: the size of @buf 3538 * @size: the size of @buf
3539 * @long_size: the long size to use if there is no header
3539 * 3540 *
3540 * This parses the header page format for information on the 3541 * This parses the header page format for information on the
3541 * ring buffer used. The @buf should be copied from 3542 * ring buffer used. The @buf should be copied from
3542 * 3543 *
3543 * /sys/kernel/debug/tracing/events/header_page 3544 * /sys/kernel/debug/tracing/events/header_page
3544 */ 3545 */
3545int pevent_parse_header_page(struct pevent *pevent, char *buf, unsigned long size) 3546int pevent_parse_header_page(struct pevent *pevent, char *buf, unsigned long size,
3547 int long_size)
3546{ 3548{
3547 if (!size) { 3549 if (!size) {
3548 /* 3550 /*
@@ -3550,10 +3552,10 @@ int pevent_parse_header_page(struct pevent *pevent, char *buf, unsigned long siz
3550 * Sorry but we just use what we find here in user space. 3552 * Sorry but we just use what we find here in user space.
3551 */ 3553 */
3552 pevent->header_page_ts_size = sizeof(long long); 3554 pevent->header_page_ts_size = sizeof(long long);
3553 pevent->header_page_size_size = sizeof(long); 3555 pevent->header_page_size_size = long_size;
3554 pevent->header_page_data_offset = sizeof(long long) + sizeof(long); 3556 pevent->header_page_data_offset = sizeof(long long) + long_size;
3555 pevent->old_format = 1; 3557 pevent->old_format = 1;
3556 return 0; 3558 return -1;
3557 } 3559 }
3558 init_input_buf(buf, size); 3560 init_input_buf(buf, size);
3559 3561