Implemented the new profiler
[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 tstamp;
14         uint16_t cpu;
15         uint16_t num_traces;
16         uint64_t trace[0];
17 } __attribute__((packed));
18
19 #define PROFTYPE_USER_TRACE64   2
20
21 struct proftype_user_trace64 {
22         uint64_t tstamp;
23         uint32_t pid;
24         uint16_t cpu;
25         uint16_t num_traces;
26         uint64_t trace[0];
27 } __attribute__((packed));
28
29 #define PROFTYPE_PID_MMAP64             3
30
31 struct proftype_pid_mmap64 {
32         uint64_t tstamp;
33         uint64_t addr;
34         uint64_t size;
35         uint64_t offset;
36         uint32_t pid;
37         uint8_t path[0];
38 } __attribute__((packed));
39
40 #define PROFTYPE_NEW_PROCESS    4
41
42 struct proftype_new_process {
43         uint64_t tstamp;
44         uint32_t pid;
45         uint8_t path[0];
46 } __attribute__((packed));