From c913c098a6a6d5afb9dc3911f2fc953510fe328a Mon Sep 17 00:00:00 2001 From: Yan Lee Date: Tue, 14 Feb 2023 19:50:10 -0800 Subject: [PATCH] mem: add extension mechanism into Packet Change-Id: Ieda941f73078d98ad7896a376d95dd1573c938e6 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67957 Reviewed-by: Yu-hsin Wang Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/mem/packet.hh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mem/packet.hh b/src/mem/packet.hh index 9d720fb9a0..ed7a94f4fb 100644 --- a/src/mem/packet.hh +++ b/src/mem/packet.hh @@ -55,6 +55,7 @@ #include "base/addr_range.hh" #include "base/cast.hh" #include "base/compiler.hh" +#include "base/extensible.hh" #include "base/flags.hh" #include "base/logging.hh" #include "base/printable.hh" @@ -290,7 +291,7 @@ class MemCmd * ultimate destination and back, possibly being conveyed by several * different Packets along the way.) */ -class Packet : public Printable +class Packet : public Printable, public Extensible { public: typedef uint32_t FlagsType; @@ -941,7 +942,8 @@ class Packet : public Printable * packet should allocate its own data. */ Packet(const PacketPtr pkt, bool clear_flags, bool alloc_data) - : cmd(pkt->cmd), id(pkt->id), req(pkt->req), + : Extensible(*pkt), + cmd(pkt->cmd), id(pkt->id), req(pkt->req), data(nullptr), addr(pkt->addr), _isSecure(pkt->_isSecure), size(pkt->size), bytesValid(pkt->bytesValid),