Lines Matching refs:nested
7 PetscLogHandler_Nested nested = (PetscLogHandler_Nested)h->data; in PetscLogHandlerNestedSetThreshold() local
10 if (oldThresh) *oldThresh = nested->threshold; in PetscLogHandlerNestedSetThreshold()
13 nested->threshold = PetscMax(newThresh, 0.0); in PetscLogHandlerNestedSetThreshold()
19 PetscLogHandler_Nested nested = (PetscLogHandler_Nested)h->data; in PetscLogEventGetNestedEvent() local
27 PetscCall(PetscIntStackTop(nested->nested_stack, &key.root)); in PetscLogEventGetNestedEvent()
29 PetscCall(PetscNestedHashPut(nested->pair_map, key, &iter, &missing)); in PetscLogEventGetNestedEvent()
37 PetscCall(PetscLogStateEventGetInfo(nested->state, key.root, &nested_event_info)); in PetscLogEventGetNestedEvent()
39 PetscCall(PetscLogStateEventRegister(nested->state, name, event_info.classid, nested_event)); in PetscLogEventGetNestedEvent()
40 PetscCall(PetscLogStateEventSetCollective(nested->state, *nested_event, event_info.collective)); in PetscLogEventGetNestedEvent()
41 PetscCall(PetscNestedHashIterSet(nested->pair_map, iter, *nested_event)); in PetscLogEventGetNestedEvent()
43 PetscCall(PetscNestedHashIterGet(nested->pair_map, iter, nested_event)); in PetscLogEventGetNestedEvent()
50 PetscLogHandler_Nested nested = (PetscLogHandler_Nested)h->data; in PetscLogStageGetNestedEvent() local
58 PetscCall(PetscIntStackTop(nested->nested_stack, &key.root)); in PetscLogStageGetNestedEvent()
60 PetscCall(PetscNestedHashPut(nested->pair_map, key, &iter, &missing)); in PetscLogStageGetNestedEvent()
70 PetscCall(PetscLogStateEventGetInfo(nested->state, key.root, &nested_event_info)); in PetscLogStageGetNestedEvent()
76 … PetscCall(PetscLogStateEventRegister(nested->state, name, nested->nested_stage_id, nested_event)); in PetscLogStageGetNestedEvent()
77 PetscCall(PetscLogStateEventSetCollective(nested->state, *nested_event, collective)); in PetscLogStageGetNestedEvent()
78 PetscCall(PetscNestedHashIterSet(nested->pair_map, iter, *nested_event)); in PetscLogStageGetNestedEvent()
80 PetscCall(PetscNestedHashIterGet(nested->pair_map, iter, nested_event)); in PetscLogStageGetNestedEvent()
87 PetscLogHandler_Nested nested = (PetscLogHandler_Nested)h->data; in PetscLogNestedFindNestedId() local
92 for (i = nested->orig_stack->top, count = 0; i > 0; i--) { in PetscLogNestedFindNestedId()
94 if (nested->orig_stack->stack[i] == orig_id) break; in PetscLogNestedFindNestedId()
120 PetscLogHandler_Nested nested = (PetscLogHandler_Nested)h->data; in PetscLogNestedCheckNested() local
125 PetscCall(PetscIntStackTop(nested->nested_stack, &key.root)); in PetscLogNestedCheckNested()
127 PetscCall(PetscNestedHashGet(nested->pair_map, key, &val)); in PetscLogNestedCheckNested()
134 PetscLogHandler_Nested nested = (PetscLogHandler_Nested)h->data; in PetscLogHandlerEventBegin_Nested() local
139 PetscCall(PetscLogHandlerEventBegin(nested->handler, nested_event, o1, o2, o3, o4)); in PetscLogHandlerEventBegin_Nested()
140 PetscCall(PetscIntStackPush(nested->nested_stack, nested_event)); in PetscLogHandlerEventBegin_Nested()
141 PetscCall(PetscIntStackPush(nested->orig_stack, NestedIdFromEvent(e))); in PetscLogHandlerEventBegin_Nested()
147 PetscLogHandler_Nested nested = (PetscLogHandler_Nested)h->data; in PetscLogHandlerNestedEventEnd() local
156 PetscCall(PetscIntStackPop(nested->nested_stack, &nested_event)); in PetscLogHandlerNestedEventEnd()
157 PetscCall(PetscIntStackPop(nested->orig_stack, &nested_id)); in PetscLogHandlerNestedEventEnd()
170 PetscCall(PetscLogHandlerEventEnd(nested->handler, nested_event, o1, o2, o3, o4)); in PetscLogHandlerNestedEventEnd()
184 PetscLogHandler_Nested nested = (PetscLogHandler_Nested)h->data; in PetscLogHandlerEventSync_Nested() local
189 PetscCall(PetscLogHandlerEventSync(nested->handler, nested_event, comm)); in PetscLogHandlerEventSync_Nested()
195 PetscLogHandler_Nested nested = (PetscLogHandler_Nested)h->data; in PetscLogHandlerStagePush_Nested() local
199 …if (nested->nested_stage_id == -1) PetscCall(PetscClassIdRegister("LogNestedStage", &nested->neste… in PetscLogHandlerStagePush_Nested()
201 PetscCall(PetscLogHandlerEventBegin(nested->handler, nested_event, NULL, NULL, NULL, NULL)); in PetscLogHandlerStagePush_Nested()
202 PetscCall(PetscIntStackPush(nested->nested_stack, nested_event)); in PetscLogHandlerStagePush_Nested()
203 PetscCall(PetscIntStackPush(nested->orig_stack, NestedIdFromStage(stage))); in PetscLogHandlerStagePush_Nested()
217 PetscLogHandler_Nested nested; in PetscLogHandlerContextCreate_Nested() local
221 nested = *nested_p; in PetscLogHandlerContextCreate_Nested()
222 PetscCall(PetscLogStateCreate(&nested->state)); in PetscLogHandlerContextCreate_Nested()
223 PetscCall(PetscIntStackCreate(&nested->nested_stack)); in PetscLogHandlerContextCreate_Nested()
224 PetscCall(PetscIntStackCreate(&nested->orig_stack)); in PetscLogHandlerContextCreate_Nested()
225 nested->nested_stage_id = -1; in PetscLogHandlerContextCreate_Nested()
226 nested->threshold = 0.01; in PetscLogHandlerContextCreate_Nested()
227 PetscCall(PetscNestedHashCreate(&nested->pair_map)); in PetscLogHandlerContextCreate_Nested()
228 PetscCall(PetscLogHandlerCreate(comm, &nested->handler)); in PetscLogHandlerContextCreate_Nested()
229 PetscCall(PetscLogHandlerSetType(nested->handler, PETSCLOGHANDLERDEFAULT)); in PetscLogHandlerContextCreate_Nested()
230 PetscCall(PetscLogHandlerSetState(nested->handler, nested->state)); in PetscLogHandlerContextCreate_Nested()
231 PetscCall(PetscLogStateStageRegister(nested->state, "", &root_stage)); in PetscLogHandlerContextCreate_Nested()
233 PetscCall(PetscLogHandlerStagePush(nested->handler, root_stage)); in PetscLogHandlerContextCreate_Nested()
234 PetscCall(PetscLogStateStagePush(nested->state, root_stage)); in PetscLogHandlerContextCreate_Nested()
235 PetscCall(PetscIntStackPush(nested->nested_stack, -1)); in PetscLogHandlerContextCreate_Nested()
236 PetscCall(PetscIntStackPush(nested->orig_stack, -1)); in PetscLogHandlerContextCreate_Nested()
246 PetscLogHandler_Nested nested = (PetscLogHandler_Nested)h->data; in PetscLogHandlerObjectCreate_Nested() local
252 PetscCall(PetscLogStateGetNumClasses(nested->state, &num_nested_registered)); in PetscLogHandlerObjectCreate_Nested()
259 …PetscCall(PetscLogStateClassRegister(nested->state, class_info.name, class_info.classid, &nested_c… in PetscLogHandlerObjectCreate_Nested()
261 PetscCall(PetscLogHandlerObjectCreate(nested->handler, obj)); in PetscLogHandlerObjectCreate_Nested()
267 PetscLogHandler_Nested nested = (PetscLogHandler_Nested)h->data; in PetscLogHandlerObjectDestroy_Nested() local
270 PetscCall(PetscLogHandlerObjectDestroy(nested->handler, obj)); in PetscLogHandlerObjectDestroy_Nested()
276 PetscLogHandler_Nested nested = (PetscLogHandler_Nested)h->data; in PetscLogHandlerDestroy_Nested() local
279 PetscCall(PetscLogStateStagePop(nested->state)); in PetscLogHandlerDestroy_Nested()
280 PetscCall(PetscLogHandlerStagePop(nested->handler, 0)); in PetscLogHandlerDestroy_Nested()
281 PetscCall(PetscLogStateDestroy(&nested->state)); in PetscLogHandlerDestroy_Nested()
282 PetscCall(PetscIntStackDestroy(nested->nested_stack)); in PetscLogHandlerDestroy_Nested()
283 PetscCall(PetscIntStackDestroy(nested->orig_stack)); in PetscLogHandlerDestroy_Nested()
284 PetscCall(PetscNestedHashDestroy(&nested->pair_map)); in PetscLogHandlerDestroy_Nested()
285 PetscCall(PetscLogHandlerDestroy(&nested->handler)); in PetscLogHandlerDestroy_Nested()
286 PetscCall(PetscFree(nested)); in PetscLogHandlerDestroy_Nested()
315 static PetscErrorCode PetscLogNestedCreatePerfNodes(MPI_Comm comm, PetscLogHandler_Nested nested, P… in PetscLogNestedCreatePerfNodes() argument
335 PetscCall(PetscNestedHashGetSize(nested->pair_map, &num_map_entries)); in PetscLogNestedCreatePerfNodes()
338 PetscCall(PetscNestedHashGetPairs(nested->pair_map, &offset, keys, vals)); in PetscLogNestedCreatePerfNodes()
376 PetscCall(PetscLogHandlerGetEventPerfInfo(nested->handler, 0, event_id, &event_info)); in PetscLogNestedCreatePerfNodes()
390 PetscLogHandler_Nested nested = (PetscLogHandler_Nested)handler->data; in PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END() local
399 PetscCall(PetscLogRegistryCreateGlobalEventNames(comm, nested->state->registry, &global_events)); in PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END()
400 PetscCall(PetscLogNestedCreatePerfNodes(comm, nested, global_events, &nodes, &perf)); in PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END()
407 PetscCall(PetscLogHandlerView_Nested_XML(nested, &tree, viewer)); in PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END()
409 PetscCall(PetscLogHandlerView_Nested_Flamegraph(nested, &tree, viewer)); in PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END()