hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/tools/lib/traceevent/kbuffer.h
....@@ -1,22 +1,7 @@
1
+/* SPDX-License-Identifier: LGPL-2.1 */
12 /*
23 * Copyright (C) 2012 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>
34 *
4
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
- * This program is free software; you can redistribute it and/or
6
- * modify it under the terms of the GNU Lesser General Public
7
- * License as published by the Free Software Foundation;
8
- * version 2.1 of the License (not later!)
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU Lesser General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU Lesser General Public
16
- * License along with this program; if not, write to the Free Software
17
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
- *
19
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
205 */
216 #ifndef _KBUFFER_H
227 #define _KBUFFER_H
....@@ -49,6 +34,8 @@
4934 void *kbuffer_read_event(struct kbuffer *kbuf, unsigned long long *ts);
5035 void *kbuffer_next_event(struct kbuffer *kbuf, unsigned long long *ts);
5136 unsigned long long kbuffer_timestamp(struct kbuffer *kbuf);
37
+unsigned long long kbuffer_subbuf_timestamp(struct kbuffer *kbuf, void *subbuf);
38
+unsigned int kbuffer_ptr_delta(struct kbuffer *kbuf, void *ptr);
5239
5340 void *kbuffer_translate_data(int swap, void *data, unsigned int *size);
5441
....@@ -65,4 +52,17 @@
6552 void kbuffer_set_old_format(struct kbuffer *kbuf);
6653 int kbuffer_start_of_data(struct kbuffer *kbuf);
6754
55
+/* Debugging */
56
+
57
+struct kbuffer_raw_info {
58
+ int type;
59
+ int length;
60
+ unsigned long long delta;
61
+ void *next;
62
+};
63
+
64
+/* Read raw data */
65
+struct kbuffer_raw_info *kbuffer_raw_get(struct kbuffer *kbuf, void *subbuf,
66
+ struct kbuffer_raw_info *info);
67
+
6868 #endif /* _K_BUFFER_H */