Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
benchmark
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
benchmark
Commits
5ec78d7d
Commit
5ec78d7d
authored
Jun 29, 2015
by
Jean-Louis Leroy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not CpuScalingEnabled on Windows.
parent
cf830f73
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
sysinfo.cc
src/sysinfo.cc
+2
-0
No files found.
src/sysinfo.cc
View file @
5ec78d7d
...
@@ -394,6 +394,7 @@ int NumCPUs(void) {
...
@@ -394,6 +394,7 @@ int NumCPUs(void) {
: nullptr)
: nullptr)
bool
CpuScalingEnabled
()
{
bool
CpuScalingEnabled
()
{
#ifndef OS_WINDOWS
// On Linux, the CPUfreq subsystem exposes CPU information as files on the
// On Linux, the CPUfreq subsystem exposes CPU information as files on the
// local file system. If reading the exported files fails, then we may not be
// local file system. If reading the exported files fails, then we may not be
// running on Linux, so we silently ignore all the read errors.
// running on Linux, so we silently ignore all the read errors.
...
@@ -407,6 +408,7 @@ bool CpuScalingEnabled() {
...
@@ -407,6 +408,7 @@ bool CpuScalingEnabled() {
fclose
(
file
);
fclose
(
file
);
if
(
memprefix
(
buff
,
bytes_read
,
"performance"
)
==
nullptr
)
return
true
;
if
(
memprefix
(
buff
,
bytes_read
,
"performance"
)
==
nullptr
)
return
true
;
}
}
#endif
return
false
;
return
false
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment