blob: f35d8fbfa2dd7fdf377d28631ba0fba4109a035b [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Frederic Weisbecker1902efe2013-09-11 16:56:44 +02002#ifndef __PERF_COMM_H
3#define __PERF_COMM_H
4
Frederic Weisbecker1902efe2013-09-11 16:56:44 +02005#include <linux/list.h>
Arnaldo Carvalho de Melof0049f22019-01-22 11:28:42 -02006#include <linux/types.h>
7#include <stdbool.h>
Frederic Weisbecker1902efe2013-09-11 16:56:44 +02008
9struct comm_str;
10
11struct comm {
12 struct comm_str *comm_str;
13 u64 start;
14 struct list_head list;
Adrian Hunter65de51f2014-07-31 09:00:44 +030015 bool exec;
Adrian Hunter0db15b12014-10-23 13:45:13 +030016 union { /* Tool specific area */
17 void *priv;
18 u64 db_id;
19 };
Frederic Weisbecker1902efe2013-09-11 16:56:44 +020020};
21
22void comm__free(struct comm *comm);
Adrian Hunter65de51f2014-07-31 09:00:44 +030023struct comm *comm__new(const char *str, u64 timestamp, bool exec);
Frederic Weisbecker1902efe2013-09-11 16:56:44 +020024const char *comm__str(const struct comm *comm);
Adrian Hunter65de51f2014-07-31 09:00:44 +030025int comm__override(struct comm *comm, const char *str, u64 timestamp,
26 bool exec);
Frederic Weisbecker1902efe2013-09-11 16:56:44 +020027
28#endif /* __PERF_COMM_H */