| 855 | } |
| 856 | |
| 857 | void gjs_profiler_add_mark(GjsProfiler* self, ProfilerTimePoint time, |
| 858 | ProfilerDuration duration, const char* group, |
| 859 | const char* name, const char* message) { |
| 860 | g_return_if_fail(self); |
| 861 | g_return_if_fail(group); |
| 862 | g_return_if_fail(name); |
| 863 | |
| 864 | #ifdef ENABLE_PROFILER |
| 865 | if (self->running && self->capture != nullptr) { |
| 866 | sysprof_capture_writer_add_mark( |
| 867 | self->capture, time.time_since_epoch().count(), -1, self->pid, |
| 868 | duration.count(), group, name, message); |
| 869 | } |
| 870 | #else |
| 871 | // Unused in the no-profiler case |
| 872 | (void)time; |
| 873 | (void)duration; |
| 874 | (void)message; |
| 875 | #endif |
| 876 | } |
| 877 | |
| 878 | bool gjs_profiler_sample_gc_memory_info( |
| 879 | GjsProfiler* self, const int64_t gc_counters[Gjs::GCCounters::N_COUNTERS]) { |
no test coverage detected