mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 13:47:56 +00:00
base-hw: make Trace_source in Platform() a class
Apparently, there is no need for exposing the data members of Trace_source, so, we sould better make them private before someone gets the impression that they are meant to be accessed directly. Ref #4217
This commit is contained in:
parent
aa6a7db50a
commit
277adcacb0
@ -216,29 +216,36 @@ Platform::Platform()
|
|||||||
init_core_log(Core_log_range { core_local_addr, log_size } );
|
init_core_log(Core_log_range { core_local_addr, log_size } );
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Trace_source : public Trace::Source::Info_accessor,
|
class Trace_source : public Trace::Source::Info_accessor,
|
||||||
private Trace::Control,
|
private Trace::Control,
|
||||||
private Trace::Source
|
private Trace::Source
|
||||||
{
|
{
|
||||||
Kernel::Thread &thread;
|
private:
|
||||||
Affinity::Location const affinity;
|
|
||||||
|
Kernel::Thread &_thread;
|
||||||
|
Affinity::Location const _affinity;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Trace::Source::Info_accessor interface
|
* Trace::Source::Info_accessor interface
|
||||||
*/
|
*/
|
||||||
Info trace_source_info() const override
|
Info trace_source_info() const override
|
||||||
{
|
{
|
||||||
Trace::Execution_time execution_time { thread.execution_time(), 0 };
|
Trace::Execution_time execution_time {
|
||||||
return { Session_label("kernel"), thread.label(), execution_time,
|
_thread.execution_time(), 0 };
|
||||||
affinity };
|
|
||||||
|
return { Session_label("kernel"), _thread.label(),
|
||||||
|
execution_time, _affinity };
|
||||||
}
|
}
|
||||||
|
|
||||||
Trace_source(Trace::Source_registry ®istry,
|
Trace_source(Trace::Source_registry ®istry,
|
||||||
Kernel::Thread &thread, Affinity::Location affinity)
|
Kernel::Thread &thread, Affinity::Location affinity)
|
||||||
:
|
:
|
||||||
Trace::Control(),
|
Trace::Control { },
|
||||||
Trace::Source(*this, *this),
|
Trace::Source { *this, *this },
|
||||||
thread(thread), affinity(affinity)
|
_thread { thread },
|
||||||
|
_affinity { affinity }
|
||||||
{
|
{
|
||||||
registry.insert(this);
|
registry.insert(this);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user