Skip to content

Commit 176b400

Browse files
lochelOpenModelica-Hudson
authored andcommitted
Add missing TRACE instructions
1 parent 748021d commit 176b400

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Compiler/Template/CodegenC.tpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,10 @@ template functionInitSynchronous(list<ClockedPartition> clockedPartitions, Strin
294294
/* Initializes the clocks of model. */
295295
void <%symbolName(modelNamePrefix,"function_initSynchronous")%>(DATA *data, threadData_t *threadData)
296296
{
297+
TRACE_PUSH
297298
long i=0, j=0;
298299
<%body%>
300+
TRACE_POP
299301
}
300302
>>
301303
end functionInitSynchronous;
@@ -344,6 +346,7 @@ template functionUpdateSynchronous(list<ClockedPartition> clockedPartitions, Str
344346
/* Update the base clock. */
345347
void <%symbolName(modelNamePrefix,"function_updateSynchronous")%>(DATA *data, threadData_t *threadData, long i)
346348
{
349+
TRACE_PUSH
347350
<%varDecls%>
348351
modelica_boolean ret;
349352
switch (i) {
@@ -352,6 +355,7 @@ template functionUpdateSynchronous(list<ClockedPartition> clockedPartitions, Str
352355
throwStreamPrint(NULL, "Internal Error: unknown base partition %ld", i);
353356
break;
354357
}
358+
TRACE_POP
355359
}
356360
>>
357361
end functionUpdateSynchronous;
@@ -397,8 +401,8 @@ template functionSystemsSynchronous(list<SubPartition> subPartitions, String mod
397401
/*Clocked systems equations */
398402
int <%symbolName(modelNamePrefix,"function_equationsSynchronous")%>(DATA *data, threadData_t *threadData, long i)
399403
{
400-
int ret;
401404
TRACE_PUSH
405+
int ret;
402406
403407
switch (i) {
404408
<%cases%>

SimulationRuntime/c/simulation/solver/synchronous.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ void checkForSynchronous(DATA *data, SOLVER_INFO* solverInfo)
115115

116116
void fireClock(DATA* data, threadData_t *threadData, long idx, double curTime)
117117
{
118+
TRACE_PUSH
118119
const CLOCK_INFO* clk = data->modelData.clocksInfo + idx;
119120
CLOCK_DATA* clkData = data->simulationInfo.clocksData + idx;
120121
data->callback->function_updateSynchronous(data, threadData, idx);
@@ -139,7 +140,7 @@ void fireClock(DATA* data, threadData_t *threadData, long idx, double curTime)
139140
insertTimer(data->simulationInfo.intvlTimers, &nextTimer);
140141
}
141142
}
142-
143+
TRACE_POP
143144
}
144145

145146
static void handleBaseClock(DATA* data, threadData_t *threadData, long idx, double curTime)

0 commit comments

Comments
 (0)