Deleted Added
sdiff udiff text old ( 10614:da37aec3ed1a ) new ( 10995:a114e2712642 )
full compact
1/*
2 * Copyright (c) 2014-2015 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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 *
37 * Authors: Kanishk Sugand
38 */
39
40#include "mem/stack_dist_calc.hh"
41
42#include "base/chunk_generator.hh"
43#include "base/intmath.hh"
44#include "base/trace.hh"
45#include "debug/StackDist.hh"
46
47StackDistCalc::StackDistCalc(bool verify_stack)
48 : index(0),
49 verifyStack(verify_stack)
50{
51 // Instantiate a new root and leaf layer
52 // Map type variable, representing a layer in the tree
53 IndexNodeMap tree_level;
54
55 // Initialize tree count for leaves
56 nextIndex.push_back(0);
57

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

87 tree.clear();
88 aiMap.clear();
89 nextIndex.clear();
90
91 // For verification
92 stack.clear();
93}
94
95// The updateSum method is a recursive function which updates
96// the node sums till the root. It also deletes the nodes that
97// are not used anymore.
98uint64_t
99StackDistCalc::updateSum(Node* node, bool from_left,
100 uint64_t sum_from_below, uint64_t level,
101 uint64_t stack_dist, bool discard_node)
102{

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

596 DPRINTF(StackDist,"Printing Last %d entries in VerifStack \n", n);
597 count = 0;
598 for (auto a = stack.rbegin(); (count < n) && (a != stack.rend());
599 ++a, ++count) {
600 DPRINTF(StackDist, "Verif Stack, Top-[%d] = %#lx\n", count, *a);
601 }
602 }
603}