The easiest way to do this is probably to only count instructions when
InUserMode() is true. You could wrap the stat accounting function in this in
the o3 commit stage and that would probably solve your problem instead of
trying to cache all sources of interrupts.
Ali
From: Guru Prasad via gem5-users
<gem5-users@gem5.org<mailto:gem5-users@gem5.org>>
Reply-To: Guru Prasad <gurup...@buffalo.edu<mailto:gurup...@buffalo.edu>>, gem5
users mailing list <gem5-users@gem5.org<mailto:gem5-users@gem5.org>>
Date: Thursday, October 9, 2014 at 1:08 PM
To: gem5 users mailing list <gem5-users@gem5.org<mailto:gem5-users@gem5.org>>
Subject: [gem5-users] [ARM] Interrupt handling
Hi,
I am looking to implement some custom instruction accounting.
I tried running some SPEC benchmarks at different frequencies and noticed that
the number of instructions vary across runs. I believe this is because of timer
based interrupts and thus would like to eliminate these.
To do this, I've been trying to find out where Gem5 sets the interrupt flags
and triggers the ISR jump. So far, the O3 model has a 'processInterrupts'
function that seems to cause the trap.
Is this a reasonable place to stop stat accounting?
Also, I looked into the kernel code to try and figure out how it is resetting
the IRQ flags. looking at arch/arm/kernel/entry-armv.S, I couldn't find
precisely where/what is doing this. However, searching kernel code for
local_irq_enable/local_irq_disable, I see that they seem to be writing to CPSR
with either orr #128 or bic #128. Is this how interrupts set/reset? If so, is
src/arch/arm/isa.cc setMiscReg a good place to instrument?
-- IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended recipient,
please notify the sender immediately and do not disclose the contents to any
other person, use it for any purpose, or store or copy the information in any
medium. Thank you.
ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered
in England & Wales, Company No: 2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ,
Registered in England & Wales, Company No: 2548782
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users