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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Florian Fischer
emper
Commits
581e494b
Commit
581e494b
authored
3 years ago
by
Florian Schmaus
Browse files
Options
Downloads
Patches
Plain Diff
Extend emper::printInfo(), add emper-info "app"
parent
de9b370b
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
apps/EmperInfo.cpp
+11
-0
11 additions, 0 deletions
apps/EmperInfo.cpp
apps/meson.build
+6
-0
6 additions, 0 deletions
apps/meson.build
emper/Emper.cpp
+88
-5
88 additions, 5 deletions
emper/Emper.cpp
emper/Emper.hpp
+8
-0
8 additions, 0 deletions
emper/Emper.hpp
with
113 additions
and
5 deletions
apps/EmperInfo.cpp
0 → 100644
+
11
−
0
View file @
581e494b
// SPDX-License-Identifier: LGPL-3.0-or-later
// Copyright © 2022 Florian Schmaus
#include
<cstdlib>
#include
"Emper.hpp"
#include
"emper-common.h"
auto
main
(
UNUSED_ARG
int
argc
,
UNUSED_ARG
char
*
argv
[])
->
int
{
emper
::
printInfo
();
return
EXIT_SUCCESS
;
}
This diff is collapsed.
Click to expand it.
apps/meson.build
+
6
−
0
View file @
581e494b
...
@@ -34,6 +34,12 @@ echoclient_exe = executable(
...
@@ -34,6 +34,12 @@ echoclient_exe = executable(
dependencies
:
emper_dep
,
dependencies
:
emper_dep
,
)
)
emper_info_exe
=
executable
(
'emper-info'
,
'EmperInfo.cpp'
,
dependencies
:
emper_dep
,
)
qsort
=
executable
(
qsort
=
executable
(
'qsort'
,
'qsort'
,
'qsort.cpp'
,
'qsort.cpp'
,
...
...
This diff is collapsed.
Click to expand it.
emper/Emper.cpp
+
88
−
5
View file @
581e494b
...
@@ -49,12 +49,95 @@ void async(const Fiber::fiber_fun0_t& function, workeraffinity_t* affinity) {
...
@@ -49,12 +49,95 @@ void async(const Fiber::fiber_fun0_t& function, workeraffinity_t* affinity) {
namespace
emper
{
namespace
emper
{
void
printInfo
(
std
::
ostream
strm
)
{
auto
operator
<<
(
std
::
ostream
&
out
,
const
ContinuationStealingMode
&
cont_stealing_mode
)
// clang-format: off
->
std
::
ostream
&
{
strm
<<
"Extensible Massive-Parallelism Execution Realm (EMPER)"
<<
std
::
endl
switch
(
cont_stealing_mode
)
{
case
ContinuationStealingMode
::
disabled
:
out
<<
"disabled"
;
break
;
case
ContinuationStealingMode
::
locked
:
out
<<
"locked"
;
break
;
case
ContinuationStealingMode
::
waitfree
:
out
<<
"waitfree"
;
break
;
}
return
out
;
}
auto
operator
>>
(
std
::
istream
&
in
,
ContinuationStealingMode
&
cont_stealing_mode
)
->
std
::
istream
&
{
std
::
string
token
;
in
>>
token
;
if
(
token
==
"disabled"
)
{
cont_stealing_mode
=
ContinuationStealingMode
::
disabled
;
}
else
if
(
token
==
"locked"
)
{
cont_stealing_mode
=
ContinuationStealingMode
::
locked
;
}
else
if
(
token
==
"waitfree"
)
{
cont_stealing_mode
=
ContinuationStealingMode
::
waitfree
;
}
else
{
in
.
setstate
(
std
::
ios_base
::
failbit
);
}
return
in
;
}
auto
operator
<<
(
std
::
ostream
&
out
,
const
ContinuationStealingMadviseStack
&
cont_stealing_madvise_stack
)
->
std
::
ostream
&
{
switch
(
cont_stealing_madvise_stack
)
{
case
ContinuationStealingMadviseStack
::
no
:
out
<<
"no"
;
break
;
case
ContinuationStealingMadviseStack
::
dontneed
:
out
<<
"dontneed"
;
break
;
case
ContinuationStealingMadviseStack
::
free
:
out
<<
"free"
;
break
;
}
return
out
;
}
auto
operator
>>
(
std
::
istream
&
in
,
ContinuationStealingMadviseStack
&
cont_stealing_madvise_stack
)
->
std
::
istream
&
{
std
::
string
token
;
in
>>
token
;
if
(
token
==
"no"
)
{
cont_stealing_madvise_stack
=
ContinuationStealingMadviseStack
::
no
;
}
else
if
(
token
==
"dontneed"
)
{
cont_stealing_madvise_stack
=
ContinuationStealingMadviseStack
::
dontneed
;
}
else
if
(
token
==
"free"
)
{
cont_stealing_madvise_stack
=
ContinuationStealingMadviseStack
::
free
;
}
else
{
in
.
setstate
(
std
::
ios_base
::
failbit
);
}
return
in
;
}
void
printInfo
(
std
::
ostream
&
strm
)
{
// clang-format off
strm
<<
std
::
boolalpha
<<
"Extensible Massive-Parallelism Execution Realm (EMPER)"
<<
std
::
endl
<<
"Version: "
<<
getFullVersion
()
<<
std
::
endl
<<
"Version: "
<<
getFullVersion
()
<<
std
::
endl
<<
"Context Size: "
<<
eu
::
bytesToHumanReadableString
(
Context
::
CONTEXT_SIZE
)
<<
std
::
endl
;
<<
"Debug: "
<<
DEBUG
<<
std
::
endl
// clang-format: on
<<
"IO: "
<<
IO
<<
std
::
endl
<<
"IO Stealing: "
<<
IO_STEALING
<<
std
::
endl
<<
"IO Lockless CQ: "
<<
IO_LOCKLESS_CQ
<<
std
::
endl
<<
"Set Affinity on Block: "
<<
SET_AFFINITY_ON_BLOCK
<<
std
::
endl
<<
"Work-Stealing Queue Default: "
<<
TOSTRING
(
EMPER_WS_QUEUE_DEFAULT_TYPE
)
<<
std
::
endl
<<
"Work-Stealing Queue Scheduler: "
<<
TOSTRING
(
EMPER_WS_QUEUE_SCHEDULER_TYPE
)
<<
std
::
endl
<<
"Continuation-Stealing: "
<<
CONTINUATION_STEALING_MODE
<<
std
::
endl
<<
"Continuation-Stealing Madvise Stack: "
<<
CONTINUATION_STEALING_MADVISE_STACK
<<
std
::
endl
<<
"Context Size: "
<<
eu
::
bytesToHumanReadableString
(
Context
::
CONTEXT_SIZE
)
<<
std
::
endl
<<
"Context Manager with Memory Manager: "
<<
CONTEXT_MANAGER_WITH_MEMORY_MANAGER
<<
std
::
endl
<<
"Memory Manager Victim Percentage: "
<<
MEMORY_MANAGER_VICTIM_PERCENTAGE
<<
std
::
endl
<<
"Stack Guard Page: "
<<
STACK_GUARD_PAGE
<<
std
::
endl
<<
"Assume Cache Line Size: "
<<
ASSUME_CACHE_LINE_SIZE
<<
std
::
endl
<<
"Stats: "
<<
STATS
<<
std
::
endl
<<
"Worker Sleep: "
<<
WORKER_SLEEP
<<
std
::
endl
<<
"Overflow Queue: "
<<
OVERFLOW_QUEUE
<<
std
::
endl
;
// clang-format on
}
}
const
bool
IO_MUST_INVALIDATE_BROKEN_CHAIN
=
EMPER_LINUX_LT
(
"5.15.0"
);
const
bool
IO_MUST_INVALIDATE_BROKEN_CHAIN
=
EMPER_LINUX_LT
(
"5.15.0"
);
...
...
This diff is collapsed.
Click to expand it.
emper/Emper.hpp
+
8
−
0
View file @
581e494b
...
@@ -257,6 +257,9 @@ enum class ContinuationStealingMode {
...
@@ -257,6 +257,9 @@ enum class ContinuationStealingMode {
locked
,
locked
,
waitfree
,
waitfree
,
};
};
auto
operator
<<
(
std
::
ostream
&
out
,
const
ContinuationStealingMode
&
cont_stealing_mode
)
->
std
::
ostream
&
;
auto
operator
>>
(
std
::
istream
&
in
,
ContinuationStealingMode
&
cont_stealing_mode
)
->
std
::
istream
&
;
const
ContinuationStealingMode
CONTINUATION_STEALING_MODE
=
const
ContinuationStealingMode
CONTINUATION_STEALING_MODE
=
ContinuationStealingMode
::
EMPER_CONTINUATION_STEALING_MODE
;
ContinuationStealingMode
::
EMPER_CONTINUATION_STEALING_MODE
;
...
@@ -271,6 +274,11 @@ enum class ContinuationStealingMadviseStack {
...
@@ -271,6 +274,11 @@ enum class ContinuationStealingMadviseStack {
dontneed
,
dontneed
,
free
,
free
,
};
};
auto
operator
<<
(
std
::
ostream
&
out
,
const
ContinuationStealingMadviseStack
&
cont_stealing_madvise_stack
)
->
std
::
ostream
&
;
auto
operator
>>
(
std
::
istream
&
in
,
ContinuationStealingMadviseStack
&
cont_stealing_madvise_stack
)
->
std
::
istream
&
;
const
enum
ContinuationStealingMadviseStack
CONTINUATION_STEALING_MADVISE_STACK
=
const
enum
ContinuationStealingMadviseStack
CONTINUATION_STEALING_MADVISE_STACK
=
ContinuationStealingMadviseStack
::
EMPER_CONTINUATION_STEALING_MADVISE_STACK
;
ContinuationStealingMadviseStack
::
EMPER_CONTINUATION_STEALING_MADVISE_STACK
;
...
...
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