1/* 2 * Copyright (c) 2011-2014 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 82 unchanged lines hidden (view full) --- 91class PMU : public SimObject, public ArmISA::BaseISADevice { 92 public: 93 PMU(const ArmPMUParams *p); 94 ~PMU(); 95 96 void addEventProbe(unsigned int id, SimObject *obj, const char *name); 97 98 public: // SimObject and related interfaces |
99 void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE; 100 void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE; |
101 102 void drainResume() M5_ATTR_OVERRIDE; 103 104 105 public: // ISA Device interface 106 /** 107 * Set a register within the PMU. 108 * --- 207 unchanged lines hidden (view full) --- 316 const std::string name; 317 318 private: 319 // Disable the default constructor 320 EventType(); 321 }; 322 323 /** State of a counter within the PMU. */ |
324 struct CounterState : public Serializable { |
325 CounterState() 326 : eventId(0), filter(0), value(0), enabled(false), 327 overflow64(false) { 328 329 listeners.reserve(4); 330 } 331 |
332 void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE; 333 void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE; |
334 335 /** 336 * Add an event count to the counter and check for overflow. 337 * 338 * @param delta Number of events to add to the counter. 339 * @return true on overflow, false otherwise. 340 */ 341 bool add(uint64_t delta); --- 165 unchanged lines hidden --- |