MCPcopy Create free account
hub / github.com/git/git / trace2_collect_process_info

Function trace2_collect_process_info

compat/linux/procinfo.c:151–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151void trace2_collect_process_info(enum trace2_process_info_reason reason)
152{
153 struct strvec names = STRVEC_INIT;
154
155 if (!trace2_is_enabled())
156 return;
157
158 switch (reason) {
159 case TRACE2_PROCESS_INFO_EXIT:
160 /*
161 * The Windows version of this calls its
162 * get_peak_memory_info() here. We may want to insert
163 * similar process-end statistics here in the future.
164 */
165 break;
166 case TRACE2_PROCESS_INFO_STARTUP:
167 push_ancestry_name(&names, getppid());
168
169 if (names.nr)
170 trace2_cmd_ancestry(names.v);
171 strvec_clear(&names);
172 break;
173 }
174
175 return;
176}

Callers

nothing calls this directly

Calls 4

trace2_is_enabledFunction · 0.85
getppidFunction · 0.85
strvec_clearFunction · 0.85
push_ancestry_nameFunction · 0.70

Tested by

no test coverage detected