[Gems-users] Instruction count in Ruby


Date: Fri, 20 Apr 2007 23:59:34 +0200
From: mehmetderin.harmanci@xxxxxxx
Subject: [Gems-users] Instruction count in Ruby

 Hello all,

 I was trying to start a simulation and I have figured out something which is
 maybe obvious but, I think somewhat misleading (at least for me). The issue is
 the following (I 'll be explaining it on an example):

 When I run 3 instructions on the cashew machine (Ultrasparc II processor) Ruby
 counts 4 instructions in its statistics. The difference comes from the fact
that
 there is one ldx instruction among the instructions which of course causes a
 data access other than an instruction access and this data access is counted as
 an instruction whereas it is just a memory access.

 With this experiment I come to the conclusion that the instruction count
 reported by Ruby is just the number of memory accesses (sum of instruction and
 data accesses) and not the number of instructions run. Can somebody confirm
 this observation?

 Thanks for your attention,

 Derin Harmanci.


[← Prev in Thread] Current Thread [Next in Thread→]