mem.hh (10994:51ff41f6a4a5) mem.hh (11139:bd894d2bdd7c)
1/*
2 * Copyright (c) 2015 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 33 unchanged lines hidden (view full) ---

42#include <memory>
43
44#include "mem/packet.hh"
45#include "sim/probe/probe.hh"
46
47namespace ProbePoints {
48
49/**
1/*
2 * Copyright (c) 2015 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 33 unchanged lines hidden (view full) ---

42#include <memory>
43
44#include "mem/packet.hh"
45#include "sim/probe/probe.hh"
46
47namespace ProbePoints {
48
49/**
50 * A struct to hold on to the essential fields from a packet, so that
51 * the packet and underlying request can be safely passed on, and
52 * consequently modified or even deleted.
53 */
54struct PacketInfo {
55 MemCmd cmd;
56 Addr addr;
57 uint32_t size;
58 Request::FlagsType flags;
59
60 explicit PacketInfo(const PacketPtr& pkt) :
61 cmd(pkt->cmd),
62 addr(pkt->getAddr()),
63 size(pkt->getSize()),
64 flags(pkt->req->getFlags()) { }
65};
66
67/**
50 * Packet probe point
51 *
52 * This probe point provides a unified interface for components that
53 * want to instrument Packets in the memory system. Components should
54 * when possible adhere to the following naming scheme:
55 *
56 * <ul>
57 *

--- 16 unchanged lines hidden (view full) ---

74 * side of a two-sided component. This probe point is primarily
75 * intended for components that cache or forward requests (e.g.,
76 * caches and XBars), single-sided components should use
77 * PktRequest instead.
78 *
79 * </ul>
80 *
81 */
68 * Packet probe point
69 *
70 * This probe point provides a unified interface for components that
71 * want to instrument Packets in the memory system. Components should
72 * when possible adhere to the following naming scheme:
73 *
74 * <ul>
75 *

--- 16 unchanged lines hidden (view full) ---

92 * side of a two-sided component. This probe point is primarily
93 * intended for components that cache or forward requests (e.g.,
94 * caches and XBars), single-sided components should use
95 * PktRequest instead.
96 *
97 * </ul>
98 *
99 */
82typedef ProbePointArg< ::PacketPtr> Packet;
100typedef ProbePointArg<PacketInfo> Packet;
83typedef std::unique_ptr<Packet> PacketUPtr;
84
85}
86
87#endif
101typedef std::unique_ptr<Packet> PacketUPtr;
102
103}
104
105#endif