1# Copyright (c) 2016 Google Inc.
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and
5# shall not be construed as granting a license to any other
6# intellectual property including but not limited to intellectual
7# property relating to a hardware implementation of the
8# functionality of the software licensed hereunder.  You may use the
9# software subject to the license terms below provided that you
10# ensure that this notice is replicated unmodified and in its
11# entirety in all distributions of the software, modified or
12# unmodified, in source code or in binary form.
13#
14# Redistribution and use in source and binary forms, with or without
15# modification, are permitted provided that the following conditions are
16# met: redistributions of source code must retain the above copyright
17# notice, this list of conditions and the following disclaimer;
18# redistributions in binary form must reproduce the above copyright
19# notice, this list of conditions and the following disclaimer in the
20# documentation and/or other materials provided with the distribution;
21# neither the name of the copyright holders nor the names of its
22# contributors may be used to endorse or promote products derived from
23# this software without specific prior written permission.
24#
25# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
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: Rahul Thakur
38
39from m5.params import *
40from m5.proxy import *
41
42from m5.objects.BaseMemProbe import BaseMemProbe
43
44class MemFootprintProbe(BaseMemProbe):
45    type = "MemFootprintProbe"
46    cxx_header = "mem/probes/mem_footprint.hh"
47    system = Param.System(Parent.any,
48                          "System pointer to get cache line and mem size")
49    page_size = Param.Unsigned(4096, "Page size for page-level footprint")
50