MCPcopy Create free account
hub / github.com/GNOME/gjs / gjs_profiler_add_mark

Function gjs_profiler_add_mark

gjs/profiler.cpp:857–876  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

855}
856
857void 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
878bool gjs_profiler_sample_gc_memory_info(
879 GjsProfiler* self, const int64_t gc_counters[Gjs::GCCounters::N_COUNTERS]) {

Callers 2

Calls 1

countMethod · 0.65

Tested by

no test coverage detected