kernel_stats.cc (4172:141705d83494) | kernel_stats.cc (5191:bebbfea0baf3) |
---|---|
1/* 2 * Copyright (c) 2004-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 19 unchanged lines hidden (view full) --- 28 * Authors: Lisa Hsu 29 * Nathan Binkert 30 */ 31 32#include <map> 33#include <stack> 34#include <string> 35 | 1/* 2 * Copyright (c) 2004-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 19 unchanged lines hidden (view full) --- 28 * Authors: Lisa Hsu 29 * Nathan Binkert 30 */ 31 32#include <map> 33#include <stack> 34#include <string> 35 |
36#include "arch/alpha/linux/threadinfo.hh" |
|
36#include "arch/alpha/kernel_stats.hh" 37#include "arch/alpha/osfpal.hh" 38#include "base/trace.hh" 39#include "cpu/thread_context.hh" 40#include "kern/tru64/tru64_syscalls.hh" 41#include "sim/system.hh" 42 43using namespace std; --- 88 unchanged lines hidden (view full) --- 132void 133Statistics::changeMode(cpu_mode newmode, ThreadContext *tc) 134{ 135 _mode[newmode]++; 136 137 if (newmode == themode) 138 return; 139 | 37#include "arch/alpha/kernel_stats.hh" 38#include "arch/alpha/osfpal.hh" 39#include "base/trace.hh" 40#include "cpu/thread_context.hh" 41#include "kern/tru64/tru64_syscalls.hh" 42#include "sim/system.hh" 43 44using namespace std; --- 88 unchanged lines hidden (view full) --- 133void 134Statistics::changeMode(cpu_mode newmode, ThreadContext *tc) 135{ 136 _mode[newmode]++; 137 138 if (newmode == themode) 139 return; 140 |
140 DPRINTF(Context, "old mode=%-8s new mode=%-8s\n", 141 modestr[themode], modestr[newmode]); | 141 DPRINTF(Context, "old mode=%s new mode=%s pid=%d\n", 142 modestr[themode], modestr[newmode], 143 Linux::ThreadInfo(tc).curTaskPID()); |
142 143 _modeGood[newmode]++; 144 _modeTicks[themode] += curTick - lastModeTick; 145 146 lastModeTick = curTick; 147 themode = newmode; 148} 149 --- 10 unchanged lines hidden (view full) --- 160 161void 162Statistics::context(Addr oldpcbb, Addr newpcbb, ThreadContext *tc) 163{ 164 assert(themode != user); 165 166 _swap_context++; 167 changeMode(newpcbb == idleProcess ? idle : kernel, tc); | 144 145 _modeGood[newmode]++; 146 _modeTicks[themode] += curTick - lastModeTick; 147 148 lastModeTick = curTick; 149 themode = newmode; 150} 151 --- 10 unchanged lines hidden (view full) --- 162 163void 164Statistics::context(Addr oldpcbb, Addr newpcbb, ThreadContext *tc) 165{ 166 assert(themode != user); 167 168 _swap_context++; 169 changeMode(newpcbb == idleProcess ? idle : kernel, tc); |
170 171 DPRINTF(Context, "Context Switch old pid=%d new pid=%d\n", 172 Linux::ThreadInfo(tc, oldpcbb).curTaskPID(), 173 Linux::ThreadInfo(tc, newpcbb).curTaskPID()); |
|
168} 169 170void 171Statistics::callpal(int code, ThreadContext *tc) 172{ 173 if (!PAL::name(code)) 174 return; 175 --- 36 unchanged lines hidden --- | 174} 175 176void 177Statistics::callpal(int code, ThreadContext *tc) 178{ 179 if (!PAL::name(code)) 180 return; 181 --- 36 unchanged lines hidden --- |