Daniel Carvalho has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/45412 )
Change subject: sim: Rename ProbePoints namespace as probing
......................................................................
sim: Rename ProbePoints namespace as probing
As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.
::ProbePoints became ::probing.
"probing" was chosen over "probe_points" because the
namespace contains more than solely probe points; it
contains all classes related to the act of probing.
Change-Id: I44567974a521707593739a2bd5933391803e5b51
Signed-off-by: Daniel R. Carvalho <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45412
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
Reviewed-by: Hoa Nguyen <[email protected]>
---
M src/arch/arm/tlb.cc
M src/arch/arm/tlb.hh
M src/cpu/base.cc
M src/cpu/base.hh
M src/cpu/pred/bpred_unit.cc
M src/cpu/pred/bpred_unit.hh
M src/mem/comm_monitor.cc
M src/mem/comm_monitor.hh
M src/mem/probes/base.hh
M src/mem/probes/mem_footprint.cc
M src/mem/probes/mem_footprint.hh
M src/mem/probes/mem_trace.cc
M src/mem/probes/mem_trace.hh
M src/mem/probes/stack_dist.cc
M src/mem/probes/stack_dist.hh
M src/sim/probe/mem.hh
M src/sim/probe/pmu.hh
M src/sim/probe/probe.hh
18 files changed, 49 insertions(+), 43 deletions(-)
Approvals:
Hoa Nguyen: Looks good to me, approved
Jason Lowe-Power: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/arm/tlb.cc b/src/arch/arm/tlb.cc
index df83395..b1dd21e 100644
--- a/src/arch/arm/tlb.cc
+++ b/src/arch/arm/tlb.cc
@@ -574,7 +574,7 @@
void
TLB::regProbePoints()
{
- ppRefills.reset(new ProbePoints::PMU(getProbeManager(), "Refills"));
+ ppRefills.reset(new probing::PMU(getProbeManager(), "Refills"));
}
Fault
diff --git a/src/arch/arm/tlb.hh b/src/arch/arm/tlb.hh
index 8414d43..bb53f3f 100644
--- a/src/arch/arm/tlb.hh
+++ b/src/arch/arm/tlb.hh
@@ -200,7 +200,7 @@
} stats;
/** PMU probe for TLB refills */
- ProbePoints::PMUUPtr ppRefills;
+ probing::PMUUPtr ppRefills;
int rangeMRU; //On lookup, only move entries ahead when outside
rangeMRU
diff --git a/src/cpu/base.cc b/src/cpu/base.cc
index 5270f9d..81581ba 100644
--- a/src/cpu/base.cc
+++ b/src/cpu/base.cc
@@ -324,11 +324,11 @@
}
-ProbePoints::PMUUPtr
+probing::PMUUPtr
BaseCPU::pmuProbePoint(const char *name)
{
- ProbePoints::PMUUPtr ptr;
- ptr.reset(new ProbePoints::PMU(getProbeManager(), name));
+ probing::PMUUPtr ptr;
+ ptr.reset(new probing::PMU(getProbeManager(), name));
return ptr;
}
diff --git a/src/cpu/base.hh b/src/cpu/base.hh
index 177d3df..81b4027 100644
--- a/src/cpu/base.hh
+++ b/src/cpu/base.hh
@@ -468,7 +468,7 @@
* @param name Name of the probe point.
* @return A unique_ptr to the new probe point.
*/
- ProbePoints::PMUUPtr pmuProbePoint(const char *name);
+ probing::PMUUPtr pmuProbePoint(const char *name);
/**
* Instruction commit probe point.
@@ -478,22 +478,22 @@
* instruction. However, CPU models committing bundles of
* instructions may call notify once for the entire bundle.
*/
- ProbePoints::PMUUPtr ppRetiredInsts;
- ProbePoints::PMUUPtr ppRetiredInstsPC;
+ probing::PMUUPtr ppRetiredInsts;
+ probing::PMUUPtr ppRetiredInstsPC;
/** Retired load instructions */
- ProbePoints::PMUUPtr ppRetiredLoads;
+ probing::PMUUPtr ppRetiredLoads;
/** Retired store instructions */
- ProbePoints::PMUUPtr ppRetiredStores;
+ probing::PMUUPtr ppRetiredStores;
/** Retired branches (any type) */
- ProbePoints::PMUUPtr ppRetiredBranches;
+ probing::PMUUPtr ppRetiredBranches;
/** CPU cycle counter even if any thread Context is suspended*/
- ProbePoints::PMUUPtr ppAllCycles;
+ probing::PMUUPtr ppAllCycles;
/** CPU cycle counter, only counts if any thread contexts is active **/
- ProbePoints::PMUUPtr ppActiveCycles;
+ probing::PMUUPtr ppActiveCycles;
/**
* ProbePoint that signals transitions of threadContexts sets.
diff --git a/src/cpu/pred/bpred_unit.cc b/src/cpu/pred/bpred_unit.cc
index 9eb5963..544c1ea 100644
--- a/src/cpu/pred/bpred_unit.cc
+++ b/src/cpu/pred/bpred_unit.cc
@@ -95,11 +95,11 @@
BTBHitRatio.precision(6);
}
-ProbePoints::PMUUPtr
+probing::PMUUPtr
BPredUnit::pmuProbePoint(const char *name)
{
- ProbePoints::PMUUPtr ptr;
- ptr.reset(new ProbePoints::PMU(getProbeManager(), name));
+ probing::PMUUPtr ptr;
+ ptr.reset(new probing::PMU(getProbeManager(), name));
return ptr;
}
diff --git a/src/cpu/pred/bpred_unit.hh b/src/cpu/pred/bpred_unit.hh
index 1cdb27c..d4a03ff 100644
--- a/src/cpu/pred/bpred_unit.hh
+++ b/src/cpu/pred/bpred_unit.hh
@@ -325,7 +325,7 @@
* @param name Name of the probe point.
* @return A unique_ptr to the new probe point.
*/
- ProbePoints::PMUUPtr pmuProbePoint(const char *name);
+ probing::PMUUPtr pmuProbePoint(const char *name);
/**
@@ -333,10 +333,10 @@
*
* @note This counter includes speculative branches.
*/
- ProbePoints::PMUUPtr ppBranches;
+ probing::PMUUPtr ppBranches;
/** Miss-predicted branches */
- ProbePoints::PMUUPtr ppMisses;
+ probing::PMUUPtr ppMisses;
/** @} */
};
diff --git a/src/mem/comm_monitor.cc b/src/mem/comm_monitor.cc
index 34e403c..765ccd4 100644
--- a/src/mem/comm_monitor.cc
+++ b/src/mem/comm_monitor.cc
@@ -68,8 +68,8 @@
void
CommMonitor::regProbePoints()
{
- ppPktReq.reset(new
ProbePoints::Packet(getProbeManager(), "PktRequest"));
- ppPktResp.reset(new
ProbePoints::Packet(getProbeManager(), "PktResponse"));
+ ppPktReq.reset(new probing::Packet(getProbeManager(), "PktRequest"));
+ ppPktResp.reset(new probing::Packet(getProbeManager(), "PktResponse"));
}
Port &
@@ -252,7 +252,7 @@
void
CommMonitor::MonitorStats::updateReqStats(
- const ProbePoints::PacketInfo& pkt_info, bool is_atomic,
+ const probing::PacketInfo& pkt_info, bool is_atomic,
bool expects_response)
{
if (pkt_info.cmd.isRead()) {
@@ -319,7 +319,7 @@
void
CommMonitor::MonitorStats::updateRespStats(
- const ProbePoints::PacketInfo& pkt_info, Tick latency, bool is_atomic)
+ const probing::PacketInfo& pkt_info, Tick latency, bool is_atomic)
{
if (pkt_info.cmd.isRead()) {
// Decrement number of outstanding read requests
@@ -354,7 +354,7 @@
{
const bool expects_response(pkt->needsResponse() &&
!pkt->cacheResponding());
- ProbePoints::PacketInfo req_pkt_info(pkt);
+ probing::PacketInfo req_pkt_info(pkt);
ppPktReq->notify(req_pkt_info);
const Tick delay(memSidePort.sendAtomic(pkt));
@@ -365,7 +365,7 @@
// Some packets, such as WritebackDirty, don't need response.
assert(pkt->isResponse() || !expects_response);
- ProbePoints::PacketInfo resp_pkt_info(pkt);
+ probing::PacketInfo resp_pkt_info(pkt);
ppPktResp->notify(resp_pkt_info);
return delay;
}
@@ -384,7 +384,7 @@
// Store relevant fields of packet, because packet may be modified
// or even deleted when sendTiming() is called.
- const ProbePoints::PacketInfo pkt_info(pkt);
+ const probing::PacketInfo pkt_info(pkt);
const bool expects_response(pkt->needsResponse() &&
!pkt->cacheResponding());
@@ -425,7 +425,7 @@
// Store relevant fields of packet, because packet may be modified
// or even deleted when sendTiming() is called.
- const ProbePoints::PacketInfo pkt_info(pkt);
+ const probing::PacketInfo pkt_info(pkt);
Tick latency = 0;
CommMonitorSenderState* received_state =
diff --git a/src/mem/comm_monitor.hh b/src/mem/comm_monitor.hh
index 03f6590..fd0e9b0 100644
--- a/src/mem/comm_monitor.hh
+++ b/src/mem/comm_monitor.hh
@@ -382,9 +382,9 @@
*/
MonitorStats(Stats::Group *parent, const CommMonitorParams
¶ms);
- void updateReqStats(const ProbePoints::PacketInfo& pkt, bool
is_atomic,
+ void updateReqStats(const probing::PacketInfo& pkt, bool is_atomic,
bool expects_response);
- void updateRespStats(const ProbePoints::PacketInfo& pkt, Tick
latency,
+ void updateRespStats(const probing::PacketInfo& pkt, Tick latency,
bool is_atomic);
};
@@ -416,10 +416,10 @@
*/
/** Successfully forwarded request packet */
- ProbePoints::PacketUPtr ppPktReq;
+ probing::PacketUPtr ppPktReq;
/** Successfully forwarded response packet */
- ProbePoints::PacketUPtr ppPktResp;
+ probing::PacketUPtr ppPktResp;
/** @} */
};
diff --git a/src/mem/probes/base.hh b/src/mem/probes/base.hh
index 64b8a56..6320dd3 100644
--- a/src/mem/probes/base.hh
+++ b/src/mem/probes/base.hh
@@ -69,10 +69,10 @@
/**
* Callback to analyse intercepted Packets.
*/
- virtual void handleRequest(const ProbePoints::PacketInfo &pkt_info) =
0;
+ virtual void handleRequest(const probing::PacketInfo &pkt_info) = 0;
private:
- class PacketListener : public
ProbeListenerArgBase<ProbePoints::PacketInfo>
+ class PacketListener : public ProbeListenerArgBase<probing::PacketInfo>
{
public:
PacketListener(BaseMemProbe &_parent,
@@ -80,7 +80,7 @@
: ProbeListenerArgBase(pm, name),
parent(_parent) {}
- void notify(const ProbePoints::PacketInfo &pkt_info) override {
+ void notify(const probing::PacketInfo &pkt_info) override {
parent.handleRequest(pkt_info);
}
diff --git a/src/mem/probes/mem_footprint.cc
b/src/mem/probes/mem_footprint.cc
index 7474d37..db023ae 100644
--- a/src/mem/probes/mem_footprint.cc
+++ b/src/mem/probes/mem_footprint.cc
@@ -92,7 +92,7 @@
}
void
-MemFootprintProbe::handleRequest(const ProbePoints::PacketInfo &pi)
+MemFootprintProbe::handleRequest(const probing::PacketInfo &pi)
{
if (!pi.cmd.isRequest() || !system->isMemAddr(pi.addr))
return;
diff --git a/src/mem/probes/mem_footprint.hh
b/src/mem/probes/mem_footprint.hh
index 803a99c..6792c0f 100644
--- a/src/mem/probes/mem_footprint.hh
+++ b/src/mem/probes/mem_footprint.hh
@@ -69,7 +69,7 @@
const uint64_t totalPagesInMem;
void insertAddr(Addr addr, AddrSet *set, uint64_t limit);
- void handleRequest(const ProbePoints::PacketInfo &pkt_info) override;
+ void handleRequest(const probing::PacketInfo &pkt_info) override;
struct MemFootprintProbeStats : public Stats::Group
{
diff --git a/src/mem/probes/mem_trace.cc b/src/mem/probes/mem_trace.cc
index 0bfce3d..c8394fc 100644
--- a/src/mem/probes/mem_trace.cc
+++ b/src/mem/probes/mem_trace.cc
@@ -103,7 +103,7 @@
}
void
-MemTraceProbe::handleRequest(const ProbePoints::PacketInfo &pkt_info)
+MemTraceProbe::handleRequest(const probing::PacketInfo &pkt_info)
{
ProtoMessage::Packet pkt_msg;
diff --git a/src/mem/probes/mem_trace.hh b/src/mem/probes/mem_trace.hh
index 84be9cb..46c36b5 100644
--- a/src/mem/probes/mem_trace.hh
+++ b/src/mem/probes/mem_trace.hh
@@ -51,7 +51,7 @@
MemTraceProbe(const MemTraceProbeParams ¶ms);
protected:
- void handleRequest(const ProbePoints::PacketInfo &pkt_info) override;
+ void handleRequest(const probing::PacketInfo &pkt_info) override;
/**
* Callback to flush and close all open output streams on exit. If
diff --git a/src/mem/probes/stack_dist.cc b/src/mem/probes/stack_dist.cc
index 78fd30b..a4c37e7 100644
--- a/src/mem/probes/stack_dist.cc
+++ b/src/mem/probes/stack_dist.cc
@@ -93,7 +93,7 @@
}
void
-StackDistProbe::handleRequest(const ProbePoints::PacketInfo &pkt_info)
+StackDistProbe::handleRequest(const probing::PacketInfo &pkt_info)
{
// only capturing read and write requests (which allocate in the
// cache)
diff --git a/src/mem/probes/stack_dist.hh b/src/mem/probes/stack_dist.hh
index 009705e..3bf8ee5 100644
--- a/src/mem/probes/stack_dist.hh
+++ b/src/mem/probes/stack_dist.hh
@@ -51,7 +51,7 @@
StackDistProbe(const StackDistProbeParams ¶ms);
protected:
- void handleRequest(const ProbePoints::PacketInfo &pkt_info) override;
+ void handleRequest(const probing::PacketInfo &pkt_info) override;
protected:
// Cache line size to simulate
diff --git a/src/sim/probe/mem.hh b/src/sim/probe/mem.hh
index 5a5390f..a129d66 100644
--- a/src/sim/probe/mem.hh
+++ b/src/sim/probe/mem.hh
@@ -43,7 +43,9 @@
#include "mem/packet.hh"
#include "sim/probe/probe.hh"
-namespace ProbePoints {
+GEM5_DEPRECATED_NAMESPACE(ProbePoints, probing);
+namespace probing
+{
/**
* A struct to hold on to the essential fields from a packet, so that
diff --git a/src/sim/probe/pmu.hh b/src/sim/probe/pmu.hh
index 7c55d20..505ce91 100644
--- a/src/sim/probe/pmu.hh
+++ b/src/sim/probe/pmu.hh
@@ -42,7 +42,9 @@
#include "sim/probe/probe.hh"
-namespace ProbePoints {
+GEM5_DEPRECATED_NAMESPACE(ProbePoints, probing);
+namespace probing
+{
/**
* PMU probe point
diff --git a/src/sim/probe/probe.hh b/src/sim/probe/probe.hh
index a0bc568..4357d63 100644
--- a/src/sim/probe/probe.hh
+++ b/src/sim/probe/probe.hh
@@ -79,7 +79,9 @@
* common instrumentation interface for devices such as PMUs that have
* different implementations in different ISAs.
*/
-namespace ProbePoints {
+GEM5_DEPRECATED_NAMESPACE(ProbePoints, probing);
+namespace probing
+{
/* Note: This is only here for documentation purposes, new probe
* points should normally be declared in their own header files. See
* for example pmu.hh.
5 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45412
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I44567974a521707593739a2bd5933391803e5b51
Gerrit-Change-Number: 45412
Gerrit-PatchSet: 10
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Hoa Nguyen <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s