|
From: Josef W. <Jos...@gm...> - 2002-10-18 09:26:42
|
On Friday 18 October 2002 08:31, Jeremy Fitzhardinge wrote: > On Thu, 2002-10-17 at 13:40, Josef Weidendorfer wrote: > > Reason: When a user want's to profile only a short part of a run, but > > this part is 10 CPU min. from the program start, it would be nice to = go > > on to that place with no tracing at all... > > I know this will kill the cache simulation somehow... but that's the = same > > problem with the traced data at the very beginning of a profile run. > > > > Alternative approach: A new CCALL only jumping to the helper when a f= lag > > is set... > > Well, one option would be to add an API for skins so that they can > change their helper function pointers in the baseblock. That way you > could point it to a simple no-op until you want it to do something. On > the other hand, putting a: > =09if (!active) > =09=09return; > at the top would get the same effect with very little additional > performance hit. I'm not so sure about this. Cachegrind does instrumentation for EVERY ori= ginal x86 instruction. Even the overhead of calling a C function can make a=20 difference, I suppose. Switching helper functions would be nice, but the = C=20 calling overhead (saving/restoring registers on the stack) is still there= =2E OK, only benchmarking will help here. > The alternative would be to regenerate the code, but I think that would > be much more expensive. Yes. Josef |