Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MojitOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
sepia-pub
MojitOS
Commits
0f23a134
Commit
0f23a134
authored
5 years ago
by
Georges Da Costa
Browse files
Options
Downloads
Patches
Plain Diff
improves debug message for RAPL
parent
0ce72a21
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rapl.c
+5
-2
5 additions, 2 deletions
rapl.c
with
5 additions
and
2 deletions
rapl.c
+
5
−
2
View file @
0f23a134
...
@@ -76,7 +76,7 @@ _rapl_t* init_rapl(const uint32_t nb_zones, const int *rapl_zones) {
...
@@ -76,7 +76,7 @@ _rapl_t* init_rapl(const uint32_t nb_zones, const int *rapl_zones) {
#ifdef DEBUG
#ifdef DEBUG
printf
(
"Result of init
\n
"
);
printf
(
"Result of init
\n
"
);
for
(
int
i
=
0
;
i
<
rapl
->
nb
;
i
++
)
for
(
int
i
=
0
;
i
<
rapl
->
nb
;
i
++
)
printf
(
"package %d, zone %d, name %s
\n
"
,
rapl
->
zon
es
[
i
],
rapl
->
packag
es
[
i
],
rapl
->
names
[
i
]);
printf
(
"package %d, zone %d, name %s
\n
"
,
rapl
->
packag
es
[
i
],
rapl
->
zon
es
[
i
],
rapl
->
names
[
i
]);
#endif
#endif
return
rapl
;
return
rapl
;
}
}
...
@@ -86,9 +86,12 @@ _rapl_t* init_rapl(const uint32_t nb_zones, const int *rapl_zones) {
...
@@ -86,9 +86,12 @@ _rapl_t* init_rapl(const uint32_t nb_zones, const int *rapl_zones) {
// values [zone + package *nbzones] microjoules
// values [zone + package *nbzones] microjoules
void
get_rapl
(
uint64_t
*
values
,
_rapl_t
*
rapl
)
{
void
get_rapl
(
uint64_t
*
values
,
_rapl_t
*
rapl
)
{
for
(
int
i
=
0
;
i
<
rapl
->
nb
;
i
++
)
{
for
(
int
i
=
0
;
i
<
rapl
->
nb
;
i
++
)
{
powercap_rapl_get_energy_uj
(
&
rapl
->
pkgs
[
rapl
->
packages
[
i
]],
int
ret
=
powercap_rapl_get_energy_uj
(
&
rapl
->
pkgs
[
rapl
->
packages
[
i
]],
rapl
->
zones
[
i
],
rapl
->
zones
[
i
],
&
values
[
i
]);
&
values
[
i
]);
#ifdef DEBUG
printf
(
"GETRAPL: package %d, zone %d, name %s, ret: %d
\n
"
,
rapl
->
packages
[
i
],
rapl
->
zones
[
i
],
rapl
->
names
[
i
],
ret
);
#endif
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment