Support atomic printks
[akaros.git] / kern / include / ros / profiler_records.h
1 /* Copyright (c) 2015 Google Inc
2  * Davide Libenzi <dlibenzi@google.com>
3  * See LICENSE for details.
4  */
5
6 #pragma once
7
8 #include <sys/types.h>
9
10 #define PROFTYPE_KERN_TRACE64   1
11
12 struct proftype_kern_trace64 {
13         uint64_t info;
14         uint64_t tstamp;
15         uint32_t pid;
16         uint16_t cpu;
17         uint16_t num_traces;
18         uint64_t trace[0];
19 } __attribute__((packed));
20
21 #define PROFTYPE_USER_TRACE64   2
22
23 struct proftype_user_trace64 {
24         uint64_t info;
25         uint64_t tstamp;
26         uint32_t pid;
27         uint16_t cpu;
28         uint16_t num_traces;
29         uint64_t trace[0];
30 } __attribute__((packed));
31
32 #define PROFTYPE_PID_MMAP64             3
33
34 struct proftype_pid_mmap64 {
35         uint64_t tstamp;
36         uint64_t addr;
37         uint64_t size;
38         uint64_t offset;
39         uint32_t pid;
40         uint8_t path[0];
41 } __attribute__((packed));
42
43 #define PROFTYPE_NEW_PROCESS    4
44
45 struct proftype_new_process {
46         uint64_t tstamp;
47         uint32_t pid;
48         uint8_t path[0];
49 } __attribute__((packed));