Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Frederic Weisbecker | 1902efe | 2013-09-11 16:56:44 +0200 | [diff] [blame] | 2 | #ifndef __PERF_COMM_H |
| 3 | #define __PERF_COMM_H |
| 4 | |
Frederic Weisbecker | 1902efe | 2013-09-11 16:56:44 +0200 | [diff] [blame] | 5 | #include <linux/list.h> |
Arnaldo Carvalho de Melo | f0049f2 | 2019-01-22 11:28:42 -0200 | [diff] [blame] | 6 | #include <linux/types.h> |
| 7 | #include <stdbool.h> |
Frederic Weisbecker | 1902efe | 2013-09-11 16:56:44 +0200 | [diff] [blame] | 8 | |
| 9 | struct comm_str; |
| 10 | |
| 11 | struct comm { |
| 12 | struct comm_str *comm_str; |
| 13 | u64 start; |
| 14 | struct list_head list; |
Adrian Hunter | 65de51f | 2014-07-31 09:00:44 +0300 | [diff] [blame] | 15 | bool exec; |
Adrian Hunter | 0db15b1 | 2014-10-23 13:45:13 +0300 | [diff] [blame] | 16 | union { /* Tool specific area */ |
| 17 | void *priv; |
| 18 | u64 db_id; |
| 19 | }; |
Frederic Weisbecker | 1902efe | 2013-09-11 16:56:44 +0200 | [diff] [blame] | 20 | }; |
| 21 | |
| 22 | void comm__free(struct comm *comm); |
Adrian Hunter | 65de51f | 2014-07-31 09:00:44 +0300 | [diff] [blame] | 23 | struct comm *comm__new(const char *str, u64 timestamp, bool exec); |
Frederic Weisbecker | 1902efe | 2013-09-11 16:56:44 +0200 | [diff] [blame] | 24 | const char *comm__str(const struct comm *comm); |
Adrian Hunter | 65de51f | 2014-07-31 09:00:44 +0300 | [diff] [blame] | 25 | int comm__override(struct comm *comm, const char *str, u64 timestamp, |
| 26 | bool exec); |
Frederic Weisbecker | 1902efe | 2013-09-11 16:56:44 +0200 | [diff] [blame] | 27 | |
| 28 | #endif /* __PERF_COMM_H */ |