Debian Codegraph @

src/LomiriMetrics/lttng/lttng_p.h

raw symbols SCIP
1 // Copyright © 2016 Canonical Ltd.
2 // Authors: Loïc Molinari <[email protected]>
3 // Albert Astals Cid <[email protected]>
4 //
5 // This file is part of Lomiri UI Toolkit.
6 //
7 // Lomiri UI Toolkit is free software: you can redistribute it and/or modify it
8 // under the terms of the GNU Lesser General Public License as published by the
9 // Free Software Foundation; version 3.
10 //
11 // Lomiri UI Toolkit is distributed in the hope that it will be useful, but
12 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
14 // for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public License
17 // along with Lomiri UI Toolkit. If not, see <http://www.gnu.org/licenses/>.
18
19 #ifndef LTTNG_P_H
20 #define LTTNG_P_H
21
22 #include <stdint.h>
23
24 typedef struct _UMLTTNGProcessEvent UMLTTNGProcessEvent;
25 typedef struct _UMLTTNGFrameEvent UMLTTNGFrameEvent;
26 typedef struct _UMLTTNGWindowEvent UMLTTNGWindowEvent;
27 typedef struct _UMLTTNGGenericEvent UMLTTNGGenericEvent;
28
29 struct UMLTTNGPlugin {
30 void (*logProcessEvent)(UMLTTNGProcessEvent*);
31 void (*logFrameEvent)(UMLTTNGFrameEvent*);
32 void (*logWindowEvent)(UMLTTNGWindowEvent*);
33 void (*logGenericEvent)(UMLTTNGGenericEvent*);
34 };
35
36 struct _UMLTTNGProcessEvent {
37 uint32_t vszMemory;
38 uint32_t rssMemory;
39 uint16_t cpuUsage;
40 uint16_t threadCount;
41 };
42
43 struct _UMLTTNGFrameEvent {
44 uint32_t window;
45 uint32_t number;
46 float deltaTime;
47 float syncTime;
48 float renderTime;
49 float gpuTime;
50 float swapTime;
51 };
52
53 struct _UMLTTNGWindowEvent {
54 const char* state;
55 uint32_t id;
56 uint16_t width;
57 uint16_t height;
58 };
59
60 struct _UMLTTNGGenericEvent {
61 uint32_t id;
62 // Keep the size in sync with UMGenericEvent::maxStringSize. Unfortunately,
63 // a static assert is not possible here since it's C and we can't include
64 // the events.h C++ header.
65 char string[64];
66 };
67
68 #endif // LTTNG_P_H