Stefan Schuermans commited on 2026-02-14 17:17:59
Showing 6 changed files, with 21 additions and 21 deletions.
| ... | ... |
@@ -20,7 +20,7 @@ |
| 20 | 20 |
* @return 0 on success (*data, *size set), |
| 21 | 21 |
* -1 on error (*data = NULL, *size = 0) |
| 22 | 22 |
*/ |
| 23 |
-int uptev_event_pack(struct _Uproctrace__Event *event, void **data, |
|
| 23 |
+int uptev_event_pack(Uproctrace__Event *event, void **data, |
|
| 24 | 24 |
size_t *size, uptev_cleaner_t *cleaner) {
|
| 25 | 25 |
*size = uproctrace__event__get_packed_size(event); |
| 26 | 26 |
*data = malloc(*size); |
| ... | ... |
@@ -22,7 +22,7 @@ |
| 22 | 22 |
* @return 0 on success (*data, *size set), |
| 23 | 23 |
* -1 on error (*data = NULL, *size = 0) |
| 24 | 24 |
*/ |
| 25 |
-int uptev_event_pack(struct _Uproctrace__Event *event, void **data, |
|
| 25 |
+int uptev_event_pack(Uproctrace__Event *event, void **data, |
|
| 26 | 26 |
size_t *size, uptev_cleaner_t *cleaner); |
| 27 | 27 |
|
| 28 | 28 |
#endif /* #ifndef UPTEV_EVENT_H */ |
| ... | ... |
@@ -26,29 +26,29 @@ int uptev_proc_begin(void **data, size_t *size) {
|
| 26 | 26 |
return -1; |
| 27 | 27 |
} |
| 28 | 28 |
|
| 29 |
- struct _Uproctrace__Timespec timestamp = UPROCTRACE__TIMESPEC__INIT; |
|
| 29 |
+ Uproctrace__Timespec timestamp = UPROCTRACE__TIMESPEC__INIT; |
|
| 30 | 30 |
uptev_timing_get_timestamp(×tamp); |
| 31 | 31 |
|
| 32 |
- struct _Uproctrace__ProcBegin proc_begin = UPROCTRACE__PROC_BEGIN__INIT; |
|
| 32 |
+ Uproctrace__ProcBegin proc_begin = UPROCTRACE__PROC_BEGIN__INIT; |
|
| 33 | 33 |
proc_begin.pid = getpid(); |
| 34 | 34 |
proc_begin.has_ppid = 1; |
| 35 | 35 |
proc_begin.ppid = getppid(); |
| 36 | 36 |
proc_begin.exe = uptev_symlink_read("/proc/self/exe", cleaner);
|
| 37 | 37 |
proc_begin.cwd = uptev_symlink_read("/proc/self/cwd", cleaner);
|
| 38 | 38 |
|
| 39 |
- struct _Uproctrace__Stringlist cmdline = UPROCTRACE__STRINGLIST__INIT; |
|
| 39 |
+ Uproctrace__Stringlist cmdline = UPROCTRACE__STRINGLIST__INIT; |
|
| 40 | 40 |
if (uptev_stringlist_read("/proc/self/cmdline", &cmdline.n_s, &cmdline.s,
|
| 41 | 41 |
cleaner) == 0) {
|
| 42 | 42 |
proc_begin.cmdline = &cmdline; |
| 43 | 43 |
} |
| 44 | 44 |
|
| 45 |
- struct _Uproctrace__Stringlist environ = UPROCTRACE__STRINGLIST__INIT; |
|
| 45 |
+ Uproctrace__Stringlist environ = UPROCTRACE__STRINGLIST__INIT; |
|
| 46 | 46 |
if (uptev_stringlist_read("/proc/self/environ", &environ.n_s, &environ.s,
|
| 47 | 47 |
cleaner) == 0) {
|
| 48 | 48 |
proc_begin.environ = &environ; |
| 49 | 49 |
} |
| 50 | 50 |
|
| 51 |
- struct _Uproctrace__Event event = UPROCTRACE__EVENT__INIT; |
|
| 51 |
+ Uproctrace__Event event = UPROCTRACE__EVENT__INIT; |
|
| 52 | 52 |
event.timestamp = ×tamp; |
| 53 | 53 |
event.proc_begin = &proc_begin; |
| 54 | 54 |
|
| ... | ... |
@@ -26,13 +26,13 @@ int uptev_proc_end(void **data, size_t *size) {
|
| 26 | 26 |
return -1; |
| 27 | 27 |
} |
| 28 | 28 |
|
| 29 |
- struct _Uproctrace__Timespec timestamp = UPROCTRACE__TIMESPEC__INIT; |
|
| 29 |
+ Uproctrace__Timespec timestamp = UPROCTRACE__TIMESPEC__INIT; |
|
| 30 | 30 |
uptev_timing_get_timestamp(×tamp); |
| 31 | 31 |
|
| 32 |
- struct _Uproctrace__Timespec cpu_time = UPROCTRACE__TIMESPEC__INIT; |
|
| 32 |
+ Uproctrace__Timespec cpu_time = UPROCTRACE__TIMESPEC__INIT; |
|
| 33 | 33 |
uptev_timing_get_proc_cpu_time(&cpu_time); |
| 34 | 34 |
|
| 35 |
- struct _Uproctrace__ProcEnd proc_end = UPROCTRACE__PROC_END__INIT; |
|
| 35 |
+ Uproctrace__ProcEnd proc_end = UPROCTRACE__PROC_END__INIT; |
|
| 36 | 36 |
proc_end.pid = getpid(); |
| 37 | 37 |
// ppid also in end event because child of fork() has no begin event |
| 38 | 38 |
proc_end.has_ppid = 1; |
| ... | ... |
@@ -41,8 +41,8 @@ int uptev_proc_end(void **data, size_t *size) {
|
| 41 | 41 |
proc_end.cpu_time = &cpu_time; |
| 42 | 42 |
|
| 43 | 43 |
struct rusage usage; |
| 44 |
- struct _Uproctrace__Timespec user_time = UPROCTRACE__TIMESPEC__INIT; |
|
| 45 |
- struct _Uproctrace__Timespec sys_time = UPROCTRACE__TIMESPEC__INIT; |
|
| 44 |
+ Uproctrace__Timespec user_time = UPROCTRACE__TIMESPEC__INIT; |
|
| 45 |
+ Uproctrace__Timespec sys_time = UPROCTRACE__TIMESPEC__INIT; |
|
| 46 | 46 |
if (getrusage(RUSAGE_SELF, &usage) == 0) {
|
| 47 | 47 |
uptev_timing_timeval_to_pb(&usage.ru_utime, &user_time); |
| 48 | 48 |
proc_end.user_time = &user_time; |
| ... | ... |
@@ -64,7 +64,7 @@ int uptev_proc_end(void **data, size_t *size) {
|
| 64 | 64 |
proc_end.n_iv_csw = usage.ru_nivcsw; |
| 65 | 65 |
} |
| 66 | 66 |
|
| 67 |
- struct _Uproctrace__Event event = UPROCTRACE__EVENT__INIT; |
|
| 67 |
+ Uproctrace__Event event = UPROCTRACE__EVENT__INIT; |
|
| 68 | 68 |
event.timestamp = ×tamp; |
| 69 | 69 |
event.proc_end = &proc_end; |
| 70 | 70 |
|
| ... | ... |
@@ -12,27 +12,27 @@ |
| 12 | 12 |
#include <time.h> |
| 13 | 13 |
|
| 14 | 14 |
void uptev_timing_timeval_to_pb(struct timeval const *tv, |
| 15 |
- struct _Uproctrace__Timespec *tsp) {
|
|
| 15 |
+ Uproctrace__Timespec *tsp) {
|
|
| 16 | 16 |
tsp->sec = tv->tv_sec; |
| 17 | 17 |
tsp->has_nsec = 1; |
| 18 | 18 |
tsp->nsec = tv->tv_usec * 1000; |
| 19 | 19 |
} |
| 20 | 20 |
|
| 21 | 21 |
void uptev_timing_timespec_to_pb(struct timespec const *ts, |
| 22 |
- struct _Uproctrace__Timespec *tsp) {
|
|
| 22 |
+ Uproctrace__Timespec *tsp) {
|
|
| 23 | 23 |
tsp->sec = ts->tv_sec; |
| 24 | 24 |
tsp->has_nsec = 1; |
| 25 | 25 |
tsp->nsec = ts->tv_nsec; |
| 26 | 26 |
} |
| 27 | 27 |
|
| 28 |
-void uptev_timing_get_timestamp(struct _Uproctrace__Timespec *timestamp) {
|
|
| 28 |
+void uptev_timing_get_timestamp(Uproctrace__Timespec *timestamp) {
|
|
| 29 | 29 |
struct timespec ts; |
| 30 | 30 |
clock_gettime(CLOCK_REALTIME, &ts); |
| 31 | 31 |
uptev_timing_timespec_to_pb(&ts, timestamp); |
| 32 | 32 |
} |
| 33 | 33 |
|
| 34 | 34 |
void uptev_timing_get_proc_cpu_time( |
| 35 |
- struct _Uproctrace__Timespec *proc_cpu_time) {
|
|
| 35 |
+ Uproctrace__Timespec *proc_cpu_time) {
|
|
| 36 | 36 |
struct timespec ts; |
| 37 | 37 |
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts); |
| 38 | 38 |
uptev_timing_timespec_to_pb(&ts, proc_cpu_time); |
| ... | ... |
@@ -18,7 +18,7 @@ |
| 18 | 18 |
* @param[in,out] timestamp initialized structure to set to current time |
| 19 | 19 |
*/ |
| 20 | 20 |
void uptev_timing_timeval_to_pb(struct timeval const *tv, |
| 21 |
- struct _Uproctrace__Timespec *tsp); |
|
| 21 |
+ Uproctrace__Timespec *tsp); |
|
| 22 | 22 |
|
| 23 | 23 |
/** |
| 24 | 24 |
* @brief convert timespec to protobuf |
| ... | ... |
@@ -26,19 +26,19 @@ void uptev_timing_timeval_to_pb(struct timeval const *tv, |
| 26 | 26 |
* @param[in,out] timestamp initialized structure to set to current time |
| 27 | 27 |
*/ |
| 28 | 28 |
void uptev_timing_timespec_to_pb(struct timespec const *ts, |
| 29 |
- struct _Uproctrace__Timespec *tsp); |
|
| 29 |
+ Uproctrace__Timespec *tsp); |
|
| 30 | 30 |
|
| 31 | 31 |
/** |
| 32 | 32 |
* @brief fill timestamp with current time |
| 33 | 33 |
* @param[in,out] timestamp initialized structure to set to current time |
| 34 | 34 |
*/ |
| 35 |
-void uptev_timing_get_timestamp(struct _Uproctrace__Timespec *timestamp); |
|
| 35 |
+void uptev_timing_get_timestamp(Uproctrace__Timespec *timestamp); |
|
| 36 | 36 |
|
| 37 | 37 |
/** |
| 38 | 38 |
* @brief fill timestamp with total CPU time used by process |
| 39 | 39 |
* @param[in,out] timestamp initialized structure to set to proccess CPU time |
| 40 | 40 |
*/ |
| 41 | 41 |
void uptev_timing_get_proc_cpu_time( |
| 42 |
- struct _Uproctrace__Timespec *proc_cpu_time); |
|
| 42 |
+ Uproctrace__Timespec *proc_cpu_time); |
|
| 43 | 43 |
|
| 44 | 44 |
#endif /* #ifndef UPTEV_TIMING_H */ |
| 45 | 45 |