activity.hh (9086:496304c8017d) activity.hh (10202:0f00b9e7305a)
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;

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

66 void advance();
67
68 /** Marks a stage as active. */
69 void activateStage(const int idx);
70
71 /** Deactivates a stage. */
72 void deactivateStage(const int idx);
73
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;

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

66 void advance();
67
68 /** Marks a stage as active. */
69 void activateStage(const int idx);
70
71 /** Deactivates a stage. */
72 void deactivateStage(const int idx);
73
74 /** Returns the activity status of a stage. */
75 bool getStageActive(const int idx) const { return stageActive[idx]; }
76
77 /** Returns the number of stages. */
78 int getNumStages() const { return numStages; }
79
74 /** Returns how many things are active within the recorder. */
80 /** Returns how many things are active within the recorder. */
75 int getActivityCount() { return activityCount; }
81 int getActivityCount() const { return activityCount; }
76
77 /** Sets the count to a starting value. Can be used to disable
78 * the idling option.
79 */
80 void setActivityCount(int count)
81 { activityCount = count; }
82
83 /** Returns if the CPU should be active. */

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

89 /** Debug function to dump the contents of the time buffer. */
90 void dump();
91
92 /** Debug function to ensure that the activity count matches the
93 * contents of the time buffer.
94 */
95 void validate();
96
82
83 /** Sets the count to a starting value. Can be used to disable
84 * the idling option.
85 */
86 void setActivityCount(int count)
87 { activityCount = count; }
88
89 /** Returns if the CPU should be active. */

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

95 /** Debug function to dump the contents of the time buffer. */
96 void dump();
97
98 /** Debug function to ensure that the activity count matches the
99 * contents of the time buffer.
100 */
101 void validate();
102
103 const std::string &name() const { return _name; }
104
97 private:
98 // provide name() for DPRINTF.
99 std::string _name;
105 private:
106 // provide name() for DPRINTF.
107 std::string _name;
100 const std::string &name() { return _name; }
101
102 /** Time buffer that tracks if any cycles has active communication
103 * in them. It should be as long as the longest communication
104 * latency in the system. Each time any time buffer is written,
105 * the activity buffer should also be written to. The
106 * activityBuffer is advanced along with all the other time
107 * buffers, so it should have a 1 somewhere in it only if there
108 * is active communication in a time buffer.

--- 25 unchanged lines hidden ---
108
109 /** Time buffer that tracks if any cycles has active communication
110 * in them. It should be as long as the longest communication
111 * latency in the system. Each time any time buffer is written,
112 * the activity buffer should also be written to. The
113 * activityBuffer is advanced along with all the other time
114 * buffers, so it should have a 1 somewhere in it only if there
115 * is active communication in a time buffer.

--- 25 unchanged lines hidden ---