Hello,
There is a certain algorithm that I need to try different
implementations for. What I need is a way of tracing execution at
runtime, so that I know how many times a particular instruction was
hit, similar to benchmarking tools that computer architects use. My
program runs in protected mode under Linux on x86 machine, and it
doesn't call any system call.
I searched a lot for a similar tool with no gain. All the experimental
and research tools I found do not run for the x86. I tried Bochs
tracing, but since it's running under Linux, it's probably disassembly
every operating system, and device driver code along with my program
which lend me gettnig a huge amoung of output. Then I looked in GDB
docs, I found a tracing mechanism that can be used but it's only
available for remote targets. I thought of writing a set of macros one
for each instruction and replace my code with those macros with each
one calling the target instruction along with the required bookkeeping
instructions, but this method is tedious and i'm sure there's
something better. Also it looks like gprof works on a much higher
level. I ran out of ideas and internet search.
I wish somebody has some experience with this.
Thanks,
|
|
0
|
|
|
|
Reply
|
mhelshou
|
3/1/2004 3:46:25 AM |
|
Mohammed Hamed wrote:
> There is a certain algorithm that I need to try different
> implementations for. What I need is a way of tracing execution at
> runtime, so that I know how many times a particular instruction was
> hit, similar to benchmarking tools that computer architects use. My
> program runs in protected mode under Linux on x86 machine, and it
> doesn't call any system call.
>
> I searched a lot for a similar tool with no gain. All the experimental
> and research tools I found do not run for the x86. I tried Bochs
> tracing, but since it's running under Linux, it's probably disassembly
> every operating system, and device driver code along with my program
> which lend me gettnig a huge amoung of output. Then I looked in GDB
> docs, I found a tracing mechanism that can be used but it's only
> available for remote targets. I thought of writing a set of macros one
> for each instruction and replace my code with those macros with each
> one calling the target instruction along with the required bookkeeping
> instructions, but this method is tedious and i'm sure there's
> something better. Also it looks like gprof works on a much higher
> level. I ran out of ideas and internet search.
Your CPU's performance-monitoring counters might prove useful.
Have you looked into Intel's VTune or AMD's CodeAnalyst?
http://intel.com/software/products/vtune/vlin/
http://www.amd.com/us-en/Processors/DevelopWithAMD/0,,30_2252_3604_9713,00.html
Regards,
Grumble
|
|
0
|
|
|
|
Reply
|
Grumble
|
3/1/2004 7:10:55 PM
|
|
Grumble <invalid@kma.eu.org> wrote in message news:<c1v054$pd$1@news-rocq.inria.fr>...
> Mohammed Hamed wrote:
>
>
> Your CPU's performance-monitoring counters might prove useful.
>
> Have you looked into Intel's VTune or AMD's CodeAnalyst?
>
> http://intel.com/software/products/vtune/vlin/
> http://www.amd.com/us-en/Processors/DevelopWithAMD/0,,30_2252_3604_9713,00.html
>
> Regards,
>
> Grumble
Thanks, I'll take a look at those tools. The price tag however looks
higher than my need. I wished if there were open source tools. I'll
try some tricks with bochs, possibly trying to filter the whole bunch
of instructions disassembeled.
Regards,
|
|
0
|
|
|
|
Reply
|
mhelshou
|
3/7/2004 2:45:20 AM
|
|
|
2 Replies
238 Views
(page loaded in 0.058 seconds)
Similiar Articles: Instruction level tracing and profiling - comp.lang.asm.x86 ...Hello, There is a certain algorithm that I need to try different implementations for. What I need is a way of tracing execution at runtime, so that I... Fitting Voigt Profile with NLINFIT - comp.soft-sys.matlab ...Instruction level tracing and profiling - comp.lang.asm.x86 ... Fitting Voigt Profile with NLINFIT - comp.soft-sys.matlab ... Instruction level tracing and profiling ... Setting a breakpoint on variable access - comp.lang.asm.x86 ...Instruction level tracing and profiling - comp.lang.asm.x86 ... Setting a breakpoint on variable access - comp.lang.asm.x86 ... Instruction level tracing and profiling ... Converting goasm code to masm - comp.lang.asm.x86Instruction level tracing and profiling - comp.lang.asm.x86 ... Converting goasm code to masm - comp.lang.asm.x86 Try this: Trace till you reach the DIV instruction ... timing an x86 instruction - comp.lang.asm.x86Instruction level tracing and profiling - comp.lang.asm.x86 ... Hi, Most Intel x86 CPUs use unified cache for the second level cache (L2), i.e. data and instruction ... Undefined XLIB Name - comp.sys.hp48smf: setting debug level in named? - comp.unix.solaris Instruction level tracing and profiling - comp.lang.asm.x86 ..... instruction pointer, register values etc., debug ... Dumping stacktrace on HPUX itanium using gdb - comp.sys.hp.hpux ...... raw arguments(like register contents, current instruction pointer, register values etc., debug at assembly level). ... The current PC for each frame is on the bt stack trace Freescale's Idea of Open Source JTAG - comp.arch.embedded ...Instruction level tracing and profiling - comp.lang.asm.x86 ... Freescale's Idea of Open Source JTAG - comp.arch.embedded ..... stepping at the machine instruction level ... Image processing ,Image segmentation - comp.soft-sys.matlab ...... of it properly as compared to ur coins boundary tracing ... C = makecform('clut', profile, LUTtype) ..i didnt ... That's why it's probably a graduate level project. How to save in TTF format - comp.fonts... instead of relying on some automated auto-trace. ... is FontLab, but there are higher professional level ... The instruction will let you know about ... the most popular ... Instruction level tracing and profiling - comp.lang.asm.x86 ...Hello, There is a certain algorithm that I need to try different implementations for. What I need is a way of tracing execution at runtime, so that I... Framework for Instruction-level Tracing and Analysis of Program ...Framework for Instruction-level Tracing and Analysis of Program Executions (Citations: 29) ... of our framework, we present a program analysis and a data locality profiling ... 7/21/2012 5:13:08 PM
|