Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
aion
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Philip Trettner
aion
Commits
f4f1a0b4
Commit
f4f1a0b4
authored
Jan 18, 2019
by
Philip Trettner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added explicit access to cycle count
parent
9f9076d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
src/aion/Tracer.hh
src/aion/Tracer.hh
+14
-3
No files found.
src/aion/Tracer.hh
View file @
f4f1a0b4
...
...
@@ -91,6 +91,17 @@ struct visitor
void
visit_thread
(
visitor
&
v
);
#ifdef _WIN32
inline
uint64_t
current_cycles
()
{
return
__rdtsc
();
}
#else // Linux/GCC
inline
uint64_t
current_cycles
()
{
unsigned
int
lo
,
hi
;
__asm__
__volatile__
(
"rdtsc"
:
"=a"
(
lo
),
"=d"
(
hi
));
return
((
uint64_t
)
hi
<<
32
)
|
lo
;
}
#endif
/// writes all trace points to a json file
/// Format:
/// {
...
...
@@ -201,6 +212,6 @@ struct raii_profiler
pd
[
3
]
=
core
;
}
};
}
}
}
}
// namespace detail
}
// namespace tracing
}
// namespace aion
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