trace: support more facets of execution time

- execution time per thread context
- execution time per scheduling context
- quantum and priority

Issue #3192
This commit is contained in:
Alexander Boettcher
2017-09-11 13:03:28 +02:00
committed by Christian Helmuth
parent 66f49e6c42
commit ae16edf1d6
21 changed files with 74 additions and 42 deletions

View File

@@ -17,6 +17,8 @@
/* Genode includes */
#include <util/string.h>
#include <base/affinity.h>
#include <base/exception.h>
#include <base/fixed_stdint.h>
#include <base/session_label.h>
namespace Genode { namespace Trace {
@@ -77,10 +79,19 @@ struct Genode::Trace::Subject_id
*/
struct Genode::Trace::Execution_time
{
unsigned long long value;
uint64_t thread_context;
addr_t scheduling_context;
uint16_t quantum { 0 };
uint16_t priority { 0 };
Execution_time() : value(0) { }
Execution_time(unsigned long long value) : value(value) { }
Execution_time() : thread_context(0), scheduling_context(0) { }
Execution_time(uint64_t thread_context, uint64_t scheduling_context)
: thread_context(thread_context), scheduling_context(scheduling_context) { }
Execution_time(uint64_t thread_context, uint64_t scheduling_context,
unsigned quantum, unsigned priority)
: thread_context(thread_context), scheduling_context(scheduling_context),
quantum(quantum), priority(priority) { }
};
@@ -112,7 +123,7 @@ class Genode::Trace::Subject_info
Thread_name _thread_name { };
State _state { INVALID };
Policy_id _policy_id { 0 };
Execution_time _execution_time { 0 };
Execution_time _execution_time { 0, 0 };
Affinity::Location _affinity { };
public: