From af620e118709e1a5272661c94641c3adf19fa524 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Fri, 3 Sep 2004 14:12:59 -0400 Subject: added system option to bin interrupt code seperately. arch/alpha/ev5.cc: set the mode explictly rather than having a bool user/notuser cpu/simple_cpu/simple_cpu.hh: there is no class Kernel kern/kernel_stats.cc: use cpu_mode_num kern/kernel_stats.hh: add interrupt mode and use cpu_mode_num rather than constant kern/linux/linux_system.cc: kern/linux/linux_system.hh: kern/system_events.cc: kern/system_events.hh: add events to change the mode to/from interrupt sim/system.cc: sim/system.hh: add a pal symbol table --HG-- extra : convert_revision : 9d30e826b72122062a5ea12d094f94760e75c66a --- kern/linux/linux_system.cc | 18 ++++++++++++++++-- kern/linux/linux_system.hh | 14 ++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) (limited to 'kern/linux') diff --git a/kern/linux/linux_system.cc b/kern/linux/linux_system.cc index 10641de87..91ad45157 100644 --- a/kern/linux/linux_system.cc +++ b/kern/linux/linux_system.cc @@ -143,6 +143,16 @@ LinuxSystem::LinuxSystem(Params *p) printThreadEvent = new PrintThreadInfo(&pcEventQueue, "threadinfo"); if (kernelSymtab->findAddress("alpha_switch_to", addr) && DTRACE(Thread)) printThreadEvent->schedule(addr + sizeof(MachInst) * 6); + + intStartEvent = new InterruptStartEvent(&pcEventQueue, "intStartEvent"); + if (kernelSymtab->findAddress("do_entInt", addr)) + intStartEvent->schedule(addr + sizeof(MachInst) * 2); + + intEndEvent = new InterruptEndEvent(&pcEventQueue, "intStartEvent"); + if (palSymtab->findAddress("Call_Pal_Rti", addr)) + intEndEvent->schedule(addr + sizeof(MachInst)); + else + panic("could not find symbol\n"); } LinuxSystem::~LinuxSystem() @@ -155,6 +165,8 @@ LinuxSystem::~LinuxSystem() delete skipCacheProbeEvent; delete debugPrintkEvent; delete idleStartEvent; + delete printThreadEvent; + delete intStartEvent; } @@ -193,6 +205,7 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(LinuxSystem) Param bin; VectorParam binned_fns; + Param bin_int; END_DECLARE_SIM_OBJECT_PARAMS(LinuxSystem) @@ -210,7 +223,8 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(LinuxSystem) INIT_PARAM_DFLT(system_type, "Type of system we are emulating", 34), INIT_PARAM_DFLT(system_rev, "Revision of system we are emulating", 1<<10), INIT_PARAM_DFLT(bin, "is this system to be binned", false), - INIT_PARAM(binned_fns, "functions to be broken down and binned") + INIT_PARAM(binned_fns, "functions to be broken down and binned"), + INIT_PARAM_DFLT(bin_int, "is interrupt code binned seperately?", false) END_INIT_SIM_OBJECT_PARAMS(LinuxSystem) @@ -230,7 +244,7 @@ CREATE_SIM_OBJECT(LinuxSystem) p->system_rev = system_rev; p->bin = bin; p->binned_fns = binned_fns; - + p->bin_int = bin_int; return new LinuxSystem(p); } diff --git a/kern/linux/linux_system.hh b/kern/linux/linux_system.hh index 707204607..f5fd2b06b 100644 --- a/kern/linux/linux_system.hh +++ b/kern/linux/linux_system.hh @@ -83,8 +83,22 @@ class LinuxSystem : public System */ LinuxSkipDelayLoopEvent *skipDelayLoopEvent; + /** + * Event to print information about thread switches if the trace flag + * Thread is set + */ PrintThreadInfo *printThreadEvent; + /** + * Event to bin Interrupts seperately from kernel code + */ + InterruptStartEvent *intStartEvent; + + /** + * Event to bin Interrupts seperately from kernel code + */ + InterruptEndEvent *intEndEvent; + /** Grab the PCBB of the idle process when it starts */ IdleStartEvent *idleStartEvent; -- cgit v1.2.3