Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gaudi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gaudi
Gaudi
Merge requests
!1408
Add algorithm to programmatically enable/disable perf
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add algorithm to programmatically enable/disable perf
rmatev/Gaudi:add-PerfProfile
into
master
Overview
11
Commits
1
Pipelines
3
Changes
3
Merged
Rosen Matev
requested to merge
rmatev/Gaudi:add-PerfProfile
into
master
2 years ago
Overview
11
Commits
1
Pipelines
3
Changes
3
Expand
0
0
Merge request reports
Compare
version 2
version 2
33bd9a11
2 years ago
version 1
4d1b816d
2 years ago
master (base)
and
latest version
latest version
7c343eaa
1 commit,
2 years ago
version 2
33bd9a11
1 commit,
2 years ago
version 1
4d1b816d
1 commit,
2 years ago
Show latest version
3 files
+
6
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
GaudiProfiling/src/component/perf/PerfProfile.cpp
+
2
−
4
Options
@@ -13,8 +13,6 @@
#include
<string_view>
#include
<sys/stat.h>
namespace
{}
/** Algorithm to enable/disable profiling with Linux perf at given events.
*
* Needs at least perf 5.9. To control perf record, start it as
@@ -22,7 +20,7 @@ namespace {}
* perf record -D -1 --control fifo:GaudiPerfProfile.fifo ... gaudirun.py ...
*
* The path to the control fifo (GaudiPerfProfile.fifo) is configurable
* with the FIFOPath property. The fifo must be created before running
the
perf.
* with the FIFOPath property. The fifo must be created before running perf.
*
*/
struct
PerfProfile
final
:
Gaudi
::
Functional
::
Consumer
<
void
()
>
{
@@ -40,7 +38,7 @@ struct PerfProfile final : Gaudi::Functional::Consumer<void()> {
}
StatusCode
finalize
()
override
{
::
close
(
m_fifo
);
if
(
m_fifo
!=
-
1
)
{
::
close
(
m_fifo
);
}
return
Consumer
::
finalize
();
}
Loading