| 149 | } |
| 150 | |
| 151 | void 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 | } |
nothing calls this directly
no test coverage detected