MemFootprintProbe.py revision 11803
17090SN/A# Copyright (c) 2016 Google Inc.
27090SN/A# All rights reserved.
37090SN/A#
47090SN/A# The license below extends only to copyright in the software and
57090SN/A# shall not be construed as granting a license to any other
67090SN/A# intellectual property including but not limited to intellectual
77090SN/A# property relating to a hardware implementation of the
87090SN/A# functionality of the software licensed hereunder.  You may use the
97090SN/A# software subject to the license terms below provided that you
107090SN/A# ensure that this notice is replicated unmodified and in its
117090SN/A# entirety in all distributions of the software, modified or
127090SN/A# unmodified, in source code or in binary form.
134486SN/A#
144486SN/A# Redistribution and use in source and binary forms, with or without
154486SN/A# modification, are permitted provided that the following conditions are
164486SN/A# met: redistributions of source code must retain the above copyright
174486SN/A# notice, this list of conditions and the following disclaimer;
184486SN/A# redistributions in binary form must reproduce the above copyright
194486SN/A# notice, this list of conditions and the following disclaimer in the
204486SN/A# documentation and/or other materials provided with the distribution;
214486SN/A# neither the name of the copyright holders nor the names of its
224486SN/A# contributors may be used to endorse or promote products derived from
234486SN/A# this software without specific prior written permission.
244486SN/A#
254486SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
264486SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
274486SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
284486SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
294486SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
304486SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
314486SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
324486SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
334486SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
344486SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
354486SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
364486SN/A#
374486SN/A# Authors: Rahul Thakur
384486SN/A
397584SAli.Saidi@arm.comfrom m5.params import *
407584SAli.Saidi@arm.comfrom m5.proxy import *
417754SWilliam.Wang@arm.comfrom BaseMemProbe import BaseMemProbe
424486SN/A
433630SN/Aclass MemFootprintProbe(BaseMemProbe):
443630SN/A    type = "MemFootprintProbe"
457587SAli.Saidi@arm.com    cxx_header = "mem/probes/mem_footprint.hh"
468212SAli.Saidi@ARM.com    system = Param.System(Parent.any,
475478SN/A                          "System pointer to get cache line and mem size")
485478SN/A    page_size = Param.Unsigned(4096, "Page size for page-level footprint")
497584SAli.Saidi@arm.com