0

I'm using EQATEC and I love it. However, I can't seem to get it to profile .NET system DLLs as well, such as System.Net.dll, or Microsoft.Xna.Framework.dll, because they're not in my executable's directory.

Is there any way to do that?

Right now it tells me a method takes a lot of time by itself, which is false because it's the external system DLL call which takes all the time, but it doesn't display this info.

Lazlo
  • 8,518
  • 14
  • 77
  • 116

2 Answers2

1

From the EQATEC user guide, under known limitations:

  • Only defined methods are currently profiled, not referenced ones. So all the methods that your application itself defines will be profiled, but not System.* etc.
Lazlo
  • 8,518
  • 14
  • 77
  • 116
1

Right now it tells me a method takes a lot of time by itself, which is false because it's the external system DLL call which takes all the time, but it doesn't display this info.

That's OK.

If you knew that some system routine owned the program counter a lot, how would that help you? You still need to figure out what in your code authorized it.

Example: Memory allocation is a system function that often takes a large fraction of time. Does that mean you need a faster memory allocator? No, it means you need to do fewer news.

You should look for routines (or even better - lines) in your code whose inclusive wall-clock time (self plus callees) is a large percent of overall time. (Don't look for high call counts or high milliseconds. Look for a high percent.)

Why? Because that's the fraction of overall time it is responsible for. If you could somehow make the routine or line take no time, the overall time would decrease by that percent. Usually the way you do this is by having it make fewer subordinate calls, or maybe none at all.

For example, if your program takes 10 seconds, and if there is a line of code that does new and its inclusive percent is 20% (i.e. that line of code and its enclosing routine is on the stack 20% of the time), then if you could execute that line a lot less or not at all, you would save 2 seconds.

Mike Dunlavey
  • 40,059
  • 14
  • 91
  • 135
  • EQATEC doesn't do line-by-line profiling either, unless I'm mistaken. Also, knowing a system routine is long can make me find other ways around it. – Lazlo Jul 04 '12 at 19:20
  • @LazloBonin: "EQATEC doesn't do line-by-line profiling". Yeah. Take it up with Richard Flamsholt. He's a good guy and the author of EQATEC. – Mike Dunlavey Jul 04 '12 at 22:15
  • I would fall in love with EQATEC if it did. – Lazlo Jul 05 '12 at 03:52
  • 1
    @LazloBonin: Oh yes, line-by-line would be really cool. It's just tricky to do correct and still be fast. Timing system calls could be done using a few tricks, though, so that is more likely to be added at some point. Can't make any promises though. – Richard Flamsholt Jul 05 '12 at 23:01
  • @RichardFlamsholt Great! How about external DLLs capability? I know EQATEC seems to work differently (re-compile these DLLs), but is it possible in the future? – Lazlo Jul 05 '12 at 23:09
  • @LazloBonin: If I were Richard, I would push back on that request, for the reasons I gave above. He and I have had spirited discussions on all this, and I use a different method, but if he somehow managed to get line-level inclusive percents in there, I'm sure you would be quite pleased. – Mike Dunlavey Jul 06 '12 at 00:51