|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: CPU at 100%
Why lower the number of global variables? Seems like the worst they can do to performance is stimulate some extra address calculation dances. The global memory page(s) is(are) probably not likely to get swapped out very often when the main line code is running.
The profiler is a wonderful thing. Pay large amounts of attention to Greg McKaskle; it's his job to know this stuff inside and out. We had a mediocre string to DevRev VI that was called way too often, The profiler highlighted the problem in just a minute or two of analysis. And none of us had seen that profiler before. (FIRST Mentor salary: seeing the lights go on in my lead programmer when he started looking at the profiler data and saw the problem about the same time I did). |
|
#2
|
|||||
|
|||||
|
Re: CPU at 100%
We had a lot of global variables and they started dead-locking... We changed some of them into local variables to avoid dead-locks.
|
|
#3
|
|||
|
|||
|
Re: CPU at 100%
You were writing globals from multiple places? If so, there are some other ways of managing those sorts of communications. They're not in my toolkit today, look for semaphores and queues and the like. And probably you fixed it in the whole with local variables (empirical observations are important).
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|