Re: Code Profilers suitable for asm applications
- From: "Rod Pemberton" <do_not_have@xxxxxxxxxxxxx>
- Date: Tue, 29 Apr 2008 04:44:17 -0400
<Chewy509@xxxxxxxxxxxxxxxx> wrote in message
news:b9055142-83fb-45a3-9517-687b47dd453e@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Anyway I'm still working on my compiler (http://chewy509.110mb.com/b0.html
), and have had some performance issues on certain OS platforms,
however I haven't been able to track down the offending component
within the compiler to find where the problems lay (or where the
bottlenecks are).
Now the performance problems are more apparent on certain OSs (namely
Windows Vista), eg on Vista, for the compiler to compiler itself takes
around 15secs, on Windows XP x64 it takes 6secs, and on Solaris (SXDE
01/08) it takes a whole 0.5secs. (Linux and FreeBSD ports both take
around 2-3secs). Yes, the same code (except linked to the appropriate
OS syscalls) on the same hardware.
What I have been trying to find is a decent profiling tool that can
take a raw EXE (or a *.asm file), profile it, and let me know where
the bottlenecks are
First, you can't control and probably can't completely measure the time each
OS spends in interrupts. I'd think you'd need cpu support for doing so.
(i.e., How do you detect that the OS is running it's interrupt code in the
middle of your code? How do you detect that your code's execution has been
stopped by an interrupt?)
But, do you really need a full assembly profiler? It appears to be OS
differences or different FASM versions from what you stated.
1) "the same code (except linked to the appropriate OS syscalls)"
2) "on the same hardware"
3) "...on Solaris (SXDE 01/08) it takes a whole 0.5secs."
4) "Windows Vista... 15secs"
I'd first check FASM on some assembly file from the net. Do you see the
same quickness on Solaris and slowness on Vista?
You could time each function by placing a wrappers around them. I'd start
with the OS calls first.
Or, you could "core out" each routine. E.g., comment out the routine so it
doesn't do anything, but won't cause the program to fail. If you get a
speed up, ... I'd "shotgun" a bunch of routines.
Since the compiler is written in itself, which in turn produces FASM
compatible assembly file (I use FASM as the backend assembler), all I
have to work with in the *.asm file as source with conventional tools.
The raw *.asm output file for the compiler is roughly 60K lines (or
1.3MB).
If B0 is written in B0, you had to "bootstrap" B0 onto each platform since
you can't compile it natively... correct? Could you still have "bootstrap"
code from FASM or whatever libraries, languages, porting, method you used
for the bootstrap? Did you recompile B0 enough times to eliminate it?
I have downloaded AMD's Code Analyst, however for raw EXEs, it can
only handle time based sampling (eg record the EIP/RIP register at x
Hz intervals), it can't tell me the number of times a function is
called or how long it's in use (which should be easy to gather based
on the stack frame).
Flags. Add function specific counters prior to each function call.
Does anyone else have any suggestions for a good profiling tool?
Sorry, not I.
Rod Pemberton
.
- References:
- Code Profilers suitable for asm applications
- From: Chewy509
- Code Profilers suitable for asm applications
- Prev by Date: Code Profilers suitable for asm applications
- Next by Date: Address computation
- Previous by thread: Code Profilers suitable for asm applications
- Next by thread: Re: Code Profilers suitable for asm applications
- Index(es):
Relevant Pages
|