blob: 71c9c39340d4bf52a8b117c0927896501970b357 [file] [log] [blame]
Frederic Weisbecker1902efe2013-09-11 16:56:44 +02001#ifndef __PERF_COMM_H
2#define __PERF_COMM_H
3
4#include "../perf.h"
5#include <linux/rbtree.h>
6#include <linux/list.h>
7
8struct comm_str;
9
10struct comm {
11 struct comm_str *comm_str;
12 u64 start;
13 struct list_head list;
Adrian Hunter65de51f2014-07-31 09:00:44 +030014 bool exec;
Adrian Hunter0db15b12014-10-23 13:45:13 +030015 union { /* Tool specific area */
16 void *priv;
17 u64 db_id;
18 };
Frederic Weisbecker1902efe2013-09-11 16:56:44 +020019};
20
21void comm__free(struct comm *comm);
Adrian Hunter65de51f2014-07-31 09:00:44 +030022struct comm *comm__new(const char *str, u64 timestamp, bool exec);
Frederic Weisbecker1902efe2013-09-11 16:56:44 +020023const char *comm__str(const struct comm *comm);
Adrian Hunter65de51f2014-07-31 09:00:44 +030024int comm__override(struct comm *comm, const char *str, u64 timestamp,
25 bool exec);
Frederic Weisbecker1902efe2013-09-11 16:56:44 +020026
27#endif /* __PERF_COMM_H */