Deleted Added
sdiff udiff text old ( 3402:db60546818d0 ) new ( 3486:11b71489efd6 )
full compact
1/*
2 * Copyright (c) 2006 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;

--- 37 unchanged lines hidden (view full) ---

46class ProfileNode;
47namespace Kernel {
48 class Statistics;
49};
50#endif
51
52class BaseCPU;
53class Checkpoint;
54class TranslatingPort;
55
56/**
57 * Struct for holding general thread state that is needed across CPU
58 * models. This includes things such as pointers to the process,
59 * memory, quiesce events, and certain stats. This can be expanded
60 * to hold more thread-specific stats within it.
61 */
62struct ThreadState {
63 typedef ThreadContext::Status Status;
64
65#if FULL_SYSTEM
66 ThreadState(BaseCPU *cpu, int _cpuId, int _tid);
67#else
68 ThreadState(BaseCPU *cpu, int _cpuId, int _tid, Process *_process,
69 short _asid);
70#endif
71
72 void serialize(std::ostream &os);
73
74 void unserialize(Checkpoint *cp, const std::string &section);
75
76 void setCpuId(int id) { cpuId = id; }
77
78 int readCpuId() { return cpuId; }
79

--- 51 unchanged lines hidden (view full) ---

131 void setFuncExeInst(Counter new_val) { funcExeInst = new_val; }
132
133 /** Returns the status of this thread. */
134 Status status() const { return _status; }
135
136 /** Sets the status of this thread. */
137 void setStatus(Status new_status) { _status = new_status; }
138
139 /** Number of instructions committed. */
140 Counter numInst;
141 /** Stat for number instructions committed. */
142 Stats::Scalar<> numInsts;
143 /** Stat for number of memory references. */
144 Stats::Scalar<> numMemRefs;
145
146 /** Number of simulated loads, used for tracking events based on

--- 96 unchanged lines hidden ---