summaryrefslogtreecommitdiff
path: root/kern/linux
diff options
context:
space:
mode:
Diffstat (limited to 'kern/linux')
-rw-r--r--kern/linux/linux_system.cc35
-rw-r--r--kern/linux/linux_system.hh16
2 files changed, 49 insertions, 2 deletions
diff --git a/kern/linux/linux_system.cc b/kern/linux/linux_system.cc
index 10641de87..fd5d48195 100644
--- a/kern/linux/linux_system.cc
+++ b/kern/linux/linux_system.cc
@@ -143,6 +143,31 @@ 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 (palSymtab->findAddress("sys_int_21", addr))
+ intStartEvent->schedule(addr + sizeof(MachInst) * 2);
+ else
+ panic("could not find symbol: sys_int_21\n");
+
+ intEndEvent = new InterruptEndEvent(&pcEventQueue, "intEndEvent");
+ if (palSymtab->findAddress("rti_to_kern", addr))
+ intEndEvent->schedule(addr) ;
+ else
+ panic("could not find symbol: rti_to_kern\n");
+
+ intEndEvent2 = new InterruptEndEvent(&pcEventQueue, "intEndEvent2");
+ if (palSymtab->findAddress("rti_to_user", addr))
+ intEndEvent2->schedule(addr);
+ else
+ panic("could not find symbol: rti_to_user\n");
+
+
+ intEndEvent3 = new InterruptEndEvent(&pcEventQueue, "intEndEvent3");
+ if (kernelSymtab->findAddress("do_softirq", addr))
+ intEndEvent3->schedule(addr + sizeof(MachInst) * 2);
+ else
+ panic("could not find symbol: do_softirq\n");
}
LinuxSystem::~LinuxSystem()
@@ -155,6 +180,10 @@ LinuxSystem::~LinuxSystem()
delete skipCacheProbeEvent;
delete debugPrintkEvent;
delete idleStartEvent;
+ delete printThreadEvent;
+ delete intStartEvent;
+ delete intEndEvent;
+ delete intEndEvent2;
}
@@ -193,6 +222,7 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(LinuxSystem)
Param<bool> bin;
VectorParam<string> binned_fns;
+ Param<bool> bin_int;
END_DECLARE_SIM_OBJECT_PARAMS(LinuxSystem)
@@ -210,7 +240,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 +261,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..5e3cba9b3 100644
--- a/kern/linux/linux_system.hh
+++ b/kern/linux/linux_system.hh
@@ -83,8 +83,24 @@ 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;
+ InterruptEndEvent *intEndEvent2;
+ InterruptEndEvent *intEndEvent3;
+
/** Grab the PCBB of the idle process when it starts */
IdleStartEvent *idleStartEvent;