Unfortunately it isn't supported right now. The instruction counting  
code was present long before uops in any form, and it hasn't been  
updated to account for them. I've brought that up before, but we  
haven't done anything to address the issue. What I imagine us doing at  
some point, and this is just my opinion at the moment, is adding a new  
stat for uops and making the current instruction counter just  
instructions. You're patch is close to that second part, except that  
it should also count StaticInst objects that aren't microops at all.  
That may be part of the difference you're seeing, although there  
aren't many non-uop based instructions.

Gabe

Quoting Vince Weaver <[email protected]>:

> Hello
>
> Is it currently possible to get total instruction count under X86?  Or
> does it only count uops?
>
> With the (horrible kludge) patch below I was able to get actual
> instruction count on the simple simluator.  The instruction counts
> generated actually match real-world perf counter retired instruction count
> fairly closely on a few benchmarks I looked at.  I was hoping though that
> maybe this was supported and I just couldn't find the right config option.
>
> Vince
>
> diff -r 1f5126d7a1bd src/cpu/simple/atomic.cc
> --- a/src/cpu/simple/atomic.cc        Tue Sep 22 00:05:14 2009 -0400
> +++ b/src/cpu/simple/atomic.cc        Thu Sep 24 16:35:32 2009 -0400
> @@ -664,8 +664,9 @@
>                  fault = curStaticInst->execute(this, traceData);
>
>                  // keep an instruction count
> -                if (fault == NoFault)
> -                    countInst();
> +                if (fault == NoFault) {
> +                    if (curStaticInst->isLastMicroop()) countInst();
> +                }
>                  else if (traceData) {
>                      // If there was a fault, we should trace this  
> instruction.
>                      delete traceData;
> _______________________________________________
> m5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/m5-dev
>


_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to