Skip to content

Commit

Permalink
Add missing TRACE instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
lochel authored and OpenModelica-Hudson committed Oct 14, 2015
1 parent 748021d commit 176b400
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Compiler/Template/CodegenC.tpl
Expand Up @@ -294,8 +294,10 @@ template functionInitSynchronous(list<ClockedPartition> clockedPartitions, Strin
/* Initializes the clocks of model. */
void <%symbolName(modelNamePrefix,"function_initSynchronous")%>(DATA *data, threadData_t *threadData)
{
TRACE_PUSH
long i=0, j=0;
<%body%>
TRACE_POP
}
>>
end functionInitSynchronous;
Expand Down Expand Up @@ -344,6 +346,7 @@ template functionUpdateSynchronous(list<ClockedPartition> clockedPartitions, Str
/* Update the base clock. */
void <%symbolName(modelNamePrefix,"function_updateSynchronous")%>(DATA *data, threadData_t *threadData, long i)
{
TRACE_PUSH
<%varDecls%>
modelica_boolean ret;
switch (i) {
Expand All @@ -352,6 +355,7 @@ template functionUpdateSynchronous(list<ClockedPartition> clockedPartitions, Str
throwStreamPrint(NULL, "Internal Error: unknown base partition %ld", i);
break;
}
TRACE_POP
}
>>
end functionUpdateSynchronous;
Expand Down Expand Up @@ -397,8 +401,8 @@ template functionSystemsSynchronous(list<SubPartition> subPartitions, String mod
/*Clocked systems equations */
int <%symbolName(modelNamePrefix,"function_equationsSynchronous")%>(DATA *data, threadData_t *threadData, long i)
{
int ret;
TRACE_PUSH
int ret;
switch (i) {
<%cases%>
Expand Down
3 changes: 2 additions & 1 deletion SimulationRuntime/c/simulation/solver/synchronous.c
Expand Up @@ -115,6 +115,7 @@ void checkForSynchronous(DATA *data, SOLVER_INFO* solverInfo)

void fireClock(DATA* data, threadData_t *threadData, long idx, double curTime)
{
TRACE_PUSH
const CLOCK_INFO* clk = data->modelData.clocksInfo + idx;
CLOCK_DATA* clkData = data->simulationInfo.clocksData + idx;
data->callback->function_updateSynchronous(data, threadData, idx);
Expand All @@ -139,7 +140,7 @@ void fireClock(DATA* data, threadData_t *threadData, long idx, double curTime)
insertTimer(data->simulationInfo.intvlTimers, &nextTimer);
}
}

TRACE_POP
}

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

0 comments on commit 176b400

Please sign in to comment.