Re: The sixty second pmc howto



ag> Let's say it takes 1000 cycles to issue a memory load
ag> because of a cache miss, and 1 cycle to increment
ag> something already in a register. Let's also say that
ag> your program does each operation the same number of times.

ag> Does the 'instructions' count each operation identically so
ag> both operations appear to cost the same, or is it sampled
ag> from some clock interrupt, so that the memory load
ag> (correctly) shows up 1000 times more often?

'instructions' is a convenience alias for closest
underlying PMC event that counts retired instructions.
Take a look at pmc(3), section "Event Name Aliases".

I could add an alias 'unhalted-cycles' that maps to:

AMD K8 -- "k8-bu-cpu-clk-unhalted"
INTEL P6 -- "p6-cpu-clk-unhalted"
INTEL PIV -- "p4-global-power-events" perhaps. I need to
check the manual again.
(The AMD K7 lacks a suitable event).

--
FreeBSD Volunteer, http://people.freebsd.org/~jkoshy
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: The sixty second pmc howto
    ... but what does "instructions" really mean? ... instructions, the time spent executing them,? ... Let's say it takes 1000 cycles to issue a memory load because of a ... so that the memory load shows up 1000 times ...
    (freebsd-current)
  • Re: Lies, damn lies and benchmarks
    ... When running using just the 16-bit registers, ... extra cycles when run on the 386 over the 286 (these were mostly system ... instructions which didn't get run too often anyways), ... The FPU was another story, the 287 FPU was usually run at an asynchronous ...
    (comp.security.misc)
  • Re: SSE2-Sort within a register
    ... register files. ... cycles. ... 128 bit SSEinstructions are split into Doubles ... Most 128 bit SSE and SSE2 ...
    (comp.lang.asm.x86)
  • Re: hobby project - 16 bit digital audio mixer using m68k
    ... how many clock cycles are required by average instructions. ... I would suggest using some more modern processor requiring less ...
    (comp.arch.embedded)
  • Re: Optimization Questions
    ... cycles you'd save would be more than offset by the cycles you'd burn ... instructions go through port 0 and port 1. ... a 16-bit register, writing one afterwards will be fast. ... Pre-read the value in EAX ...
    (comp.lang.asm.x86)