| 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 | #include "lttng_p.h" |
| 20 | |
| 21 | #undef TRACEPOINT_PROVIDER |
| 22 | #define TRACEPOINT_PROVIDER LomiriMetrics |
| 23 | #undef TRACEPOINT_INCLUDE |
| 24 | #define TRACEPOINT_INCLUDE "./tracepoints_p.h" |
| 25 | #if !defined(TRACEPOINTS_H) || defined(TRACEPOINT_HEADER_MULTI_READ) |
| 26 | #define TRACEPOINTS_P_H |
| 27 | #include <lttng/tracepoint.h> |
| 28 | |
| 29 | TRACEPOINT_EVENT( |
| 30 | LomiriMetrics, process, |
| 31 | TP_ARGS( |
| 32 | UMLTTNGProcessEvent*, processEvent |
| 33 | ), |
| 34 | TP_FIELDS( |
| 35 | ctf_integer(uint16_t, cpu_usage, processEvent->cpuUsage) |
| 36 | ctf_integer(uint32_t, vsz_memory, processEvent->vszMemory) |
| 37 | ctf_integer(uint32_t, rss_memory, processEvent->rssMemory) |
| 38 | ctf_integer(uint16_t, thread_count, processEvent->threadCount) |
| 39 | ) |
| 40 | ) |
| 41 | |
| 42 | TRACEPOINT_EVENT( |
| 43 | LomiriMetrics, frame, |
| 44 | TP_ARGS( |
| 45 | UMLTTNGFrameEvent*, frameEvent |
| 46 | ), |
| 47 | TP_FIELDS( |
| 48 | ctf_integer(uint32_t, window, frameEvent->window) |
| 49 | ctf_integer(uint32_t, number, frameEvent->number) |
| 50 | ctf_float(float, delta_time, frameEvent->deltaTime) |
| 51 | ctf_float(float, sync_time, frameEvent->syncTime) |
| 52 | ctf_float(float, render_time, frameEvent->renderTime) |
| 53 | ctf_float(float, gpu_time, frameEvent->gpuTime) |
| 54 | ctf_float(float, swap_time, frameEvent->swapTime) |
| 55 | ) |
| 56 | ) |
| 57 | |
| 58 | TRACEPOINT_EVENT( |
| 59 | LomiriMetrics, window, |
| 60 | TP_ARGS( |
| 61 | UMLTTNGWindowEvent*, windowEvent |
| 62 | ), |
| 63 | TP_FIELDS( |
| 64 | ctf_integer(uint32_t, id, windowEvent->id) |
| 65 | ctf_string(state, windowEvent->state) |
| 66 | ctf_integer(uint16_t, width, windowEvent->width) |
| 67 | ctf_integer(uint16_t, height, windowEvent->height) |
| 68 | ) |
| 69 | ) |
| 70 | |
| 71 | TRACEPOINT_EVENT( |
| 72 | LomiriMetrics, generic, |
| 73 | TP_ARGS( |
| 74 | UMLTTNGGenericEvent*, genericEvent |
| 75 | ), |
| 76 | TP_FIELDS( |
| 77 | ctf_integer(uint32_t, id, genericEvent->id) |
| 78 | ctf_string(string, genericEvent->string) |
| 79 | ) |
| 80 | ) |
| 81 | |
| 82 | #endif // TRACEPOINTS_P_H |
| 83 | #include <lttng/tracepoint-event.h> |