Re: Instruction Tracing for Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andi Kleen <[email protected]>
Date: 08 Jul 2005 21:11:03 +0200

> While some CPUs (like Intel P4) have ways to do such hardware
> tracing I know of no free tool that uses it. There are some user
> space tools to collect at user space, but they probably won't help you.

FWIW, even without explicit tracing support in the CPU it
is possible to get these kinds of traces nontheless.

One great example is how they did this on Sparc sun4d machines
at Sun using SKY which was written by Gordon Irlam.  You can
read about it at:

     http://www.base.com/gordoni/sky.html

Basically, the "simulator" would take advantage of Sparc's
delay slot branching to explicitly execute one instruction
from the kernel's code stream at a time.

So it would branch to the kernel's current PC, and in the delay
slot branch back into the simulator.

The only special case is that it needs two temporary registers, global
registers %g2 and %g3, to pull off this trick.  So if the instruction
needed to actually use either register %g2 or %g3, it was emulated in
software instead of actually being executed.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux