Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
emper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lehrstuhl für Informatik 4 (Systemsoftware)
manycore
emper
Commits
c0315ae1
Commit
c0315ae1
authored
4 years ago
by
Florian Schmaus
Browse files
Options
Downloads
Patches
Plain Diff
Apply clang-tidy suggestions revealed due EMPER_STATS using DCE
parent
466d5985
No related branches found
Branches containing commit
No related tags found
1 merge request
!16
Use Dead Code Elimination (DCE) instead of #ifdef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
emper/strategies/laws/LawsDispatcher.cpp
+1
-1
1 addition, 1 deletion
emper/strategies/laws/LawsDispatcher.cpp
emper/strategies/laws/LawsScheduler.cpp
+4
-4
4 additions, 4 deletions
emper/strategies/laws/LawsScheduler.cpp
with
5 additions
and
5 deletions
emper/strategies/laws/LawsDispatcher.cpp
+
1
−
1
View file @
c0315ae1
...
...
@@ -28,7 +28,7 @@ void LawsDispatcher::dispatchLoop() {
// is runnable.
if
(
isRunnable
(
fiber
))
{
if
constexpr
(
emper
::
STATS
)
{
LawsStrategy
::
FiberSource
fiberSource
=
auto
fiberSource
=
static_cast
<
LawsStrategy
::
FiberSource
>
(
fiber
->
getFlag
());
switch
(
fiberSource
)
{
case
LawsStrategy
::
FiberSource
::
fromPriority
:
...
...
This diff is collapsed.
Click to expand it.
emper/strategies/laws/LawsScheduler.cpp
+
4
−
4
View file @
c0315ae1
...
...
@@ -79,7 +79,7 @@ auto LawsScheduler::nextFiber() -> Fiber* {
if
(
fiber
!=
nullptr
)
{
// We fetched a fiber from your local priority queue.
if
constexpr
(
emper
::
STATS
)
{
unsigned
int
flag
=
static_cast
<
unsigned
int
>
(
LawsStrategy
::
FiberSource
::
fromPriority
);
auto
flag
=
static_cast
<
unsigned
int
>
(
LawsStrategy
::
FiberSource
::
fromPriority
);
fiber
->
setFlag
(
flag
);
}
...
...
@@ -90,7 +90,7 @@ auto LawsScheduler::nextFiber() -> Fiber* {
if
(
likely
(
poped
))
{
if
constexpr
(
emper
::
STATS
)
{
unsigned
int
flag
=
static_cast
<
unsigned
int
>
(
LawsStrategy
::
FiberSource
::
fromLocal
);
auto
flag
=
static_cast
<
unsigned
int
>
(
LawsStrategy
::
FiberSource
::
fromLocal
);
fiber
->
setFlag
(
flag
);
}
...
...
@@ -106,7 +106,7 @@ auto LawsScheduler::nextFiber() -> Fiber* {
poped
=
queues
[
victim
]
->
popTop
(
&
fiber
);
if
(
poped
)
{
if
(
emper
::
STATS
)
{
unsigned
int
flag
=
static_cast
<
unsigned
int
>
(
LawsStrategy
::
FiberSource
::
stolen
);
auto
flag
=
static_cast
<
unsigned
int
>
(
LawsStrategy
::
FiberSource
::
stolen
);
fiber
->
setFlag
(
flag
);
}
...
...
@@ -119,7 +119,7 @@ auto LawsScheduler::nextFiber() -> Fiber* {
poped
=
mainThreadQueue
->
popTop
(
&
fiber
);
if
(
poped
)
{
if
constexpr
(
emper
::
STATS
)
{
unsigned
int
flag
=
static_cast
<
unsigned
int
>
(
LawsStrategy
::
FiberSource
::
mainThread
);
auto
flag
=
static_cast
<
unsigned
int
>
(
LawsStrategy
::
FiberSource
::
mainThread
);
fiber
->
setFlag
(
flag
);
}
...
...
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