Deleted Added
sdiff udiff text old ( 4172:141705d83494 ) new ( 5191:bebbfea0baf3 )
full compact
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/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
140 DPRINTF(Context, "old mode=%-8s new mode=%-8s\n",
141 modestr[themode], modestr[newmode]);
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);
168}
169
170void
171Statistics::callpal(int code, ThreadContext *tc)
172{
173 if (!PAL::name(code))
174 return;
175

--- 36 unchanged lines hidden ---