pmu.hh (10461:afeb5cdb3907) | pmu.hh (10609:ae5582819481) |
---|---|
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 --- 309 unchanged lines hidden (view full) --- 318 private: 319 // Disable the default constructor 320 EventType(); 321 }; 322 323 /** State of a counter within the PMU. */ 324 struct CounterState { 325 CounterState() | 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 --- 309 unchanged lines hidden (view full) --- 318 private: 319 // Disable the default constructor 320 EventType(); 321 }; 322 323 /** State of a counter within the PMU. */ 324 struct CounterState { 325 CounterState() |
326 : eventId(0), value(0), enabled(false), | 326 : eventId(0), filter(0), value(0), enabled(false), |
327 overflow64(false) { 328 329 listeners.reserve(4); 330 } 331 332 void serialize(std::ostream &os); 333 void unserialize(Checkpoint *cp, const std::string §ion); 334 --- 4 unchanged lines hidden (view full) --- 339 * @return true on overflow, false otherwise. 340 */ 341 bool add(uint64_t delta); 342 343 public: /* Serializable state */ 344 /** Counter event ID */ 345 EventTypeId eventId; 346 | 327 overflow64(false) { 328 329 listeners.reserve(4); 330 } 331 332 void serialize(std::ostream &os); 333 void unserialize(Checkpoint *cp, const std::string §ion); 334 --- 4 unchanged lines hidden (view full) --- 339 * @return true on overflow, false otherwise. 340 */ 341 bool add(uint64_t delta); 342 343 public: /* Serializable state */ 344 /** Counter event ID */ 345 EventTypeId eventId; 346 |
347 /** Filtering settings (evtCount is unused) */ 348 PMEVTYPER_t filter; 349 |
|
347 /** Current value of the counter */ 348 uint64_t value; 349 350 /** Is the counter enabled? */ 351 bool enabled; 352 353 /** Is this a 64-bit counter? */ 354 bool overflow64; --- 62 unchanged lines hidden (view full) --- 417 * for the counter are detached if the counter is inactive. 418 * 419 * @param id ID of counter within the PMU. 420 * @param ctr Reference to the counter's state 421 */ 422 void updateCounter(CounterId id, CounterState &ctr); 423 424 /** | 350 /** Current value of the counter */ 351 uint64_t value; 352 353 /** Is the counter enabled? */ 354 bool enabled; 355 356 /** Is this a 64-bit counter? */ 357 bool overflow64; --- 62 unchanged lines hidden (view full) --- 420 * for the counter are detached if the counter is inactive. 421 * 422 * @param id ID of counter within the PMU. 423 * @param ctr Reference to the counter's state 424 */ 425 void updateCounter(CounterId id, CounterState &ctr); 426 427 /** |
428 * Check if a counter's settings allow it to be counted. 429 * 430 * @param ctr Counter state instance representing this counter. 431 * @return false if the counter is active, true otherwise. 432 */ 433 bool isFiltered(const CounterState &ctr) const; 434 435 /** |
|
425 * Call updateCounter() for each counter in the PMU if the 426 * counter's state has changed.. 427 * 428 * @see updateCounter() 429 */ 430 void updateAllCounters(); 431 432 protected: /* State that needs to be serialized */ --- 63 unchanged lines hidden --- | 436 * Call updateCounter() for each counter in the PMU if the 437 * counter's state has changed.. 438 * 439 * @see updateCounter() 440 */ 441 void updateAllCounters(); 442 443 protected: /* State that needs to be serialized */ --- 63 unchanged lines hidden --- |