Deleted Added
sdiff udiff text old ( 12113:bdf1545c9919 ) new ( 12125:0066d9926c1a )
full compact
1/*
2 * Copyright (c) 2013-2014, 2017 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

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

41
42#include "params/TickedObject.hh"
43#include "sim/clocked_object.hh"
44
45Ticked::Ticked(ClockedObject &object_,
46 Stats::Scalar *imported_num_cycles,
47 Event::Priority priority) :
48 object(object_),
49 event(*this, priority),
50 running(false),
51 lastStopped(0),
52 /* Allocate numCycles if an external stat wasn't passed in */
53 numCyclesLocal((imported_num_cycles ? NULL : new Stats::Scalar)),
54 numCycles((imported_num_cycles ? *imported_num_cycles :
55 *numCyclesLocal))
56{ }
57
58void
59Ticked::regStats()
60{
61 if (numCyclesLocal) {
62 numCycles
63 .name(object.name() + ".totalTickCycles")
64 .desc("Number of cycles that the object ticked or was stopped");
65 }
66

--- 60 unchanged lines hidden ---