Skip to content

Commit

Permalink
- fix for wrong profiling results
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@20564 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Marcus Walther committed May 12, 2014
1 parent 94047a8 commit 9a87450
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SimulationRuntime/c/util/rtclock.c
Expand Up @@ -501,7 +501,10 @@ void rt_init(int numTimers) {
alloc_and_copy((void**)&rt_clock_ncall_total,numTimers,sizeof(uint32_t));
alloc_and_copy((void**)&rt_clock_ncall_min,numTimers,sizeof(uint32_t));
alloc_and_copy((void**)&rt_clock_ncall_max,numTimers,sizeof(uint32_t));
memset(rt_clock_ncall_min + NUM_RT_CLOCKS*sizeof(uint32_t), 0xFF, (numTimers-NUM_RT_CLOCKS) * sizeof(uint32_t));
/* This memset-command is not working properly, especially on windows.
* It's writing into the rt_clock_ncall_total-array and thus the values are wrong.
* However, the profiling-functionality seems to work without it. */
//memset(rt_clock_ncall_min + NUM_RT_CLOCKS*sizeof(uint32_t), 0xFF, (numTimers-NUM_RT_CLOCKS) * sizeof(uint32_t));
}

void rt_measure_overhead(int ix)
Expand Down

0 comments on commit 9a87450

Please sign in to comment.