Skip to content

Commit ae0a45d

Browse files
committed
use linux_perf to collect CPU plugin trace log
1 parent 36ac2b4 commit ae0a45d

File tree

2 files changed

+1535
-1
lines changed

2 files changed

+1535
-1
lines changed

src/plugins/intel_cpu/src/graph.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
#include "utils/node_dumper.h"
7676
#include "utils/verbose.h"
7777
#include "weights_cache.hpp"
78+
#include "linux_perf.hpp"
7879

7980
#if (OV_THREAD == OV_THREAD_TBB || OV_THREAD == OV_THREAD_TBB_AUTO)
8081
# include <tbb/task.h>
@@ -1208,6 +1209,7 @@ bool Graph::ProcessDynNodes() const {
12081209

12091210
void Graph::PushInputData(const std::size_t& index, const ov::SoPtr<ITensor>& input) {
12101211
OPENVINO_ASSERT(IsReady(), "Wrong state. Topology not ready.");
1212+
auto prof=LinuxPerf::Profile("Graph::PushInputData");
12111213
if (index < inputNodes.size() && inputNodes[index]) {
12121214
auto node = inputNodes[index];
12131215
auto childEdge = node->getChildEdgeAt(0);
@@ -1239,7 +1241,7 @@ void Graph::PushInputData(const std::size_t& index, const ov::SoPtr<ITensor>& in
12391241
// suppose always being shared infer_request intel_cpu::Tensor to Graph if isDynamic.
12401242
void Graph::PullOutputData(std::unordered_map<std::size_t, ov::SoPtr<ITensor>>& output) {
12411243
OPENVINO_ASSERT(IsReady(), "Wrong state. Topology not ready.");
1242-
1244+
auto prof=LinuxPerf::Profile("Graph::PullOutputData");
12431245
for (size_t output_index = 0; output_index < outputNodes.size(); ++output_index) {
12441246
auto node = outputNodes[output_index];
12451247
auto parentEdge = node->getParentEdgeAt(0);
@@ -1352,6 +1354,8 @@ VecMemoryDescs Graph::getOutputMemoryDescriptors() const {
13521354

13531355
void Graph::InferStatic(SyncInferRequest* request, int numaId) {
13541356
for (const auto& node : m_executableGraphNodes) {
1357+
auto prof = LinuxPerf::Profile("Graph::InferStatic::ExecuteNode: type:" + node->getTypeStr() +
1358+
" name:" + node->getName());
13551359
ExecuteNodeWithCatch(node, request, numaId);
13561360
}
13571361
}
@@ -1625,6 +1629,8 @@ void Graph::InferDynamic(SyncInferRequest* request, int numaId, UpdateStrategy&&
16251629

16261630
for (; inferCounter < stopIndx; ++inferCounter) {
16271631
auto& node = m_executableGraphNodes[inferCounter];
1632+
auto prof = LinuxPerf::Profile("Graph::InferDynamic::ExecuteNode: type:" + node->getTypeStr() +
1633+
" name:" + node->getName());
16281634

16291635
ExecuteNodeWithCatch(node, request, numaId);
16301636
}

0 commit comments

Comments
 (0)