Skip to content

Commit

Permalink
- revert r23957
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23959 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
lochel committed Jan 7, 2015
1 parent b3705ef commit a01449d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 38 deletions.
7 changes: 0 additions & 7 deletions SimulationRuntime/c/simulation/simulation_runtime.cpp
Expand Up @@ -240,13 +240,6 @@ void setGlobalVerboseLevel(int argc, char**argv)
if(useStream[LOG_DSS_JAC])
useStream[LOG_DSS] = 1;

#ifndef USE_DEBUG_TRACE
if(useStream[LOG_TRACE])
{
warningStreamPrint(LOG_STDOUT, 0, "LOG_TRACE is not available. Please recompile runtime with '#define USE_DEBUG_TRACE' and try again.");
}
#endif

delete flags;
}

Expand Down
5 changes: 1 addition & 4 deletions SimulationRuntime/c/simulation/solver/perform_simulation.c
Expand Up @@ -130,10 +130,7 @@ int prefixedName_performSimulation(DATA* data, SOLVER_INFO* solverInfo)
threadData->currentErrorStage = ERROR_SIMULATION;

#ifdef USE_DEBUG_TRACE
if(useStream[LOG_TRACE])
{
printf("TRACE: push loop step=%ld, time=%.12g\n", __currStepNo, solverInfo->currentTime);
}
printf("TRACE: push loop step=%ld, time=%.12g\n", __currStepNo, solverInfo->currentTime);
#endif

omc_alloc_interface.collect_a_little();
Expand Down
22 changes: 0 additions & 22 deletions SimulationRuntime/c/util/omc_error.c
Expand Up @@ -68,7 +68,6 @@ const char *LOG_STREAM_NAME[SIM_LOG_MAX] = {
"LOG_SOTI",
"LOG_STATS",
"LOG_STATS_V",
"LOG_TRACE",
"LOG_UTIL",
"LOG_ZEROCROSSINGS",
};
Expand Down Expand Up @@ -105,7 +104,6 @@ const char *LOG_STREAM_DESC[SIM_LOG_MAX] = {
"final solution of the initialization", /* LOG_SOTI */
"additional statistics about timer/events/solver", /* LOG_STATS */
"additional statistics for LOG_STATS", /* LOG_STATS_V */
"call stack for debugging purpose" /* LOG_TRACE */
"???", /* LOG_UTIL*/
"additional information about the zerocrossings" /* LOG_ZEROCROSSINGS */
};
Expand All @@ -125,26 +123,6 @@ int lastType[SIM_LOG_MAX];
int lastStream = LOG_UNKNOWN;
int showAllWarnings = 0;

#ifdef USE_DEBUG_TRACE
int DEBUG_TRACE_PUSH_HELPER(const char* pFnc, const char* pFile, const long ln)
{
if(useStream[LOG_TRACE])
{
printf("TRACE: push %s (%s:%d)\n", pFnc, pFile, ln);
}
return 0;
}

int DEBUG_TRACE_POP_HELPER(int traceID)
{
if(useStream[LOG_TRACE])
{
printf("TRACE: pop\n");
}
return 0;
}
#endif

void initDumpSystem()
{
int i;
Expand Down
7 changes: 2 additions & 5 deletions SimulationRuntime/c/util/omc_error.h
Expand Up @@ -102,7 +102,6 @@ enum LOG_STREAM
LOG_SOTI,
LOG_STATS,
LOG_STATS_V,
LOG_TRACE,
LOG_UTIL,
LOG_ZEROCROSSINGS,

Expand Down Expand Up @@ -144,10 +143,8 @@ void setStreamPrintXML(int isXML);
#endif

#ifdef USE_DEBUG_TRACE
extern int DEBUG_TRACE_PUSH_HELPER(const char* pFnc, const char* pFile, const long ln);
extern int DEBUG_TRACE_POP_HELPER(int traceID);
#define TRACE_PUSH int __DEBUG_TRACE_HELPER = DEBUG_TRACE_PUSH_HELPER(__FUNCTION__, __FILE__, __LINE__);
#define TRACE_POP DEBUG_TRACE_POP_HELPER(__DEBUG_TRACE_HELPER);
#define TRACE_PUSH printf("TRACE: push %s (%s:%d)\n", __FUNCTION__, __FILE__, __LINE__);
#define TRACE_POP printf("TRACE: pop\n");
#else
#define TRACE_PUSH
#define TRACE_POP
Expand Down

0 comments on commit a01449d

Please sign in to comment.