base: timestamp support for ARM 64-Bit

issue #3407
This commit is contained in:
Sebastian Sumpf 2019-06-04 21:17:10 +02:00 committed by Christian Helmuth
parent ef8140cce5
commit 1b489820a9
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,7 @@
/*
* \brief Trace timestamp
* \author Stefan Kalkowski
* \author Sebastian Sumpf
* \date 2019-03-25
*/
@ -22,7 +23,10 @@ namespace Genode { namespace Trace {
inline Timestamp timestamp()
{
return 0;
uint64_t t;
/* cycle counter */
asm volatile("mrs %0, pmccntr_el0" : "=r" (t));
return t;
}
} }