configs,arch,sim: Move fixFuncEventAddr into the Workload class.
This is specialized per arch, and the Workload class is the only thing actually using it. It doesn't make any sense to dispatch those calls over to the System object, especially since that was, in most cases, the only reason an ISA specific system class even still existed. After this change, only ARM still has an architecture specific System class. Change-Id: I81b6c4db14b612bff8840157cfc56393370095e2 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24287 Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
This commit is contained in:
@@ -53,7 +53,6 @@ Source('global_event.cc')
|
||||
Source('init.cc', add_tags='python')
|
||||
Source('init_signals.cc')
|
||||
Source('main.cc', tags='main')
|
||||
Source('workload.cc')
|
||||
Source('kernel_workload.cc')
|
||||
Source('port.cc')
|
||||
Source('python.cc', add_tags='python')
|
||||
|
||||
@@ -434,16 +434,6 @@ class System : public SimObject, public PCEventScope
|
||||
|
||||
void workItemEnd(uint32_t tid, uint32_t workid);
|
||||
|
||||
/**
|
||||
* Fix up an address used to match PCs for hooking simulator
|
||||
* events on to target function executions. See comment in
|
||||
* system.cc for details.
|
||||
*/
|
||||
virtual Addr fixFuncEventAddr(Addr addr)
|
||||
{
|
||||
panic("Base fixFuncEventAddr not implemented.\n");
|
||||
}
|
||||
|
||||
public:
|
||||
std::vector<BaseRemoteGDB *> remoteGDB;
|
||||
bool breakpoint();
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met: redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer;
|
||||
* redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution;
|
||||
* neither the name of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "sim/workload.hh"
|
||||
|
||||
#include "params/Workload.hh"
|
||||
#include "sim/system.hh"
|
||||
|
||||
Addr
|
||||
Workload::fixFuncEventAddr(Addr addr)
|
||||
{
|
||||
return system->fixFuncEventAddr(addr);
|
||||
}
|
||||
@@ -39,7 +39,7 @@ class ThreadContext;
|
||||
class Workload : public SimObject
|
||||
{
|
||||
protected:
|
||||
Addr fixFuncEventAddr(Addr);
|
||||
virtual Addr fixFuncEventAddr(Addr addr) const { return addr; }
|
||||
|
||||
public:
|
||||
using SimObject::SimObject;
|
||||
|
||||
Reference in New Issue
Block a user