2c2
< * Copyright (c) 2014 ARM Limited
---
> * Copyright (c) 2014-2015 ARM Limited
43a44
> #include <limits>
48,51d48
< #include "mem/packet.hh"
< #include "params/StackDistCalc.hh"
< #include "sim/sim_object.hh"
< #include "sim/stats.hh"
177c174
< class StackDistCalc : public SimObject
---
> class StackDistCalc
270,302d266
< * A convenient way of refering to infinity.
< */
< static constexpr uint64_t Infinity = std::numeric_limits<uint64_t>::max();
<
< /**
< * Process the given address. If Mark is true then set the
< * mark flag of the leaf node.
< * This function returns the stack distance of the incoming
< * address and the previous status of the mark flag.
< *
< * @param r_address The current address to process
< * @param mark set the mark flag for the address.
< * @return The stack distance of the current address and the mark flag.
< */
< std::pair<uint64_t , bool> calcStackDist(const Addr r_address,
< bool mark = false);
<
< /**
< * Process the given address:
< * - Lookup the tree for the given address
< * - delete old node if found in tree
< * - add a new node (if addNewNode flag is set)
< * This function returns the stack distance of the incoming
< * address and the status of the mark flag.
< *
< * @param r_address The current address to process
< * @param addNewNode If true, a new node is added to the tree
< * @return The stack distance of the current address and the mark flag.
< */
< std::pair<uint64_t, bool> calcStackDistAndUpdate(const Addr r_address,
< bool addNewNode = true);
<
< /**
343a308
> StackDistCalc(bool verify_stack = false);
344a310,311
> ~StackDistCalc();
>
346c313
< * Convenience method to get the params when registering stats.
---
> * A convenient way of refering to infinity.
348,349c315
< const StackDistCalcParams* params() const
< { return reinterpret_cast<const StackDistCalcParams*>(_params); }
---
> static constexpr uint64_t Infinity = std::numeric_limits<uint64_t>::max();
351d316
< StackDistCalc(const StackDistCalcParams* p);
353c318,329
< ~StackDistCalc();
---
> /**
> * Process the given address. If Mark is true then set the
> * mark flag of the leaf node.
> * This function returns the stack distance of the incoming
> * address and the previous status of the mark flag.
> *
> * @param r_address The current address to process
> * @param mark set the mark flag for the address.
> * @return The stack distance of the current address and the mark flag.
> */
> std::pair<uint64_t, bool> calcStackDist(const Addr r_address,
> bool mark = false);
355,356d330
< void regStats();
<
358c332,337
< * Update the tree and the statistics.
---
> * Process the given address:
> * - Lookup the tree for the given address
> * - delete old node if found in tree
> * - add a new node (if addNewNode flag is set)
> * This function returns the stack distance of the incoming
> * address and the status of the mark flag.
360,361c339,341
< * @param cmd Command from the packet
< * @param addr Address to put on the stack
---
> * @param r_address The current address to process
> * @param addNewNode If true, a new node is added to the tree
> * @return The stack distance of the current address and the mark flag.
363c343,344
< void update(const MemCmd& cmd, Addr addr);
---
> std::pair<uint64_t, bool> calcStackDistAndUpdate(const Addr r_address,
> bool addNewNode = true);
433,451d413
<
< // Disable the linear histograms
< const bool disableLinearHists;
<
< // Disable the logarithmic histograms
< const bool disableLogHists;
<
< // Reads linear histogram
< Stats::Histogram readLinearHist;
<
< // Reads logarithmic histogram
< Stats::SparseHistogram readLogHist;
<
< // Writes linear histogram
< Stats::Histogram writeLinearHist;
<
< // Writes logarithmic histogram
< Stats::SparseHistogram writeLogHist;
<
453a416
>