mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
parent
4ac553e5ff
commit
46c9927294
@ -32,7 +32,10 @@ using namespace Foc;
|
||||
Trace::Execution_time Platform_thread::execution_time() const
|
||||
{
|
||||
Foc::l4_kernel_clock_t us = 0;
|
||||
/* syscall does not return ever, if thread is on remote cpu,
|
||||
see issue #4357
|
||||
l4_thread_stats_time(_thread.local.data()->kcap(), &us);
|
||||
*/
|
||||
return { us, 0, 10000 /* quantum readable ?*/, _prio };
|
||||
}
|
||||
|
||||
|
@ -78,14 +78,22 @@ void Thread::start()
|
||||
Info trace_source_info() const override
|
||||
{
|
||||
uint64_t const sc_time = 0;
|
||||
addr_t const kcap = (addr_t) platform_thread.pager_object_badge();
|
||||
|
||||
using namespace Foc;
|
||||
l4_kernel_clock_t ec_time = 0;
|
||||
l4_msgtag_t res = l4_thread_stats_time(kcap, &ec_time);
|
||||
if (l4_error(res))
|
||||
Genode::error("cpu time for ", thread.name(),
|
||||
" is not available ", l4_error(res));
|
||||
|
||||
/*
|
||||
* The 'l4_thread_stats_time' syscall does not always return if
|
||||
* the thread is on remote CPU. Disable the feature to keep core
|
||||
* safe (see issue #4357).
|
||||
*/
|
||||
if (0) {
|
||||
addr_t const kcap = (addr_t) platform_thread.pager_object_badge();
|
||||
l4_msgtag_t res = l4_thread_stats_time(kcap, &ec_time);
|
||||
if (l4_error(res))
|
||||
Genode::error("cpu time for ", thread.name(),
|
||||
" is not available ", l4_error(res));
|
||||
}
|
||||
|
||||
return { Session_label("core"), thread.name(),
|
||||
Trace::Execution_time(ec_time, sc_time, 10000,
|
||||
|
Loading…
Reference in New Issue
Block a user