mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
Remove obsolete Trace::Session::subject_info RPC
Issue #3610 Fixes #4349
This commit is contained in:
@@ -126,9 +126,6 @@ struct Genode::Trace::Session_client : Genode::Rpc_client<Genode::Trace::Session
|
||||
void resume(Subject_id subject) override {
|
||||
call<Rpc_resume>(subject); }
|
||||
|
||||
Subject_info subject_info(Subject_id subject) override {
|
||||
return call<Rpc_subject_info>(subject); }
|
||||
|
||||
Dataspace_capability buffer(Subject_id subject) override {
|
||||
return call<Rpc_buffer>(subject); }
|
||||
|
||||
|
||||
@@ -85,13 +85,6 @@ struct Genode::Trace::Session : Genode::Session
|
||||
*/
|
||||
virtual void resume(Subject_id) = 0;
|
||||
|
||||
/**
|
||||
* Obtain details about tracing subject
|
||||
*
|
||||
* \throw Nonexistent_subject
|
||||
*/
|
||||
virtual Subject_info subject_info(Subject_id) = 0;
|
||||
|
||||
/**
|
||||
* Obtain trace buffer of given subject
|
||||
*
|
||||
@@ -144,8 +137,6 @@ struct Genode::Trace::Session : Genode::Session
|
||||
GENODE_TYPE_LIST(Out_of_ram, Out_of_caps));
|
||||
GENODE_RPC_THROW(Rpc_subject_infos, size_t, subject_infos,
|
||||
GENODE_TYPE_LIST(Out_of_ram, Out_of_caps));
|
||||
GENODE_RPC_THROW(Rpc_subject_info, Subject_info, subject_info,
|
||||
GENODE_TYPE_LIST(Nonexistent_subject), Subject_id);
|
||||
GENODE_RPC_THROW(Rpc_buffer, Dataspace_capability, buffer,
|
||||
GENODE_TYPE_LIST(Nonexistent_subject, Subject_not_traced),
|
||||
Subject_id);
|
||||
@@ -154,7 +145,7 @@ struct Genode::Trace::Session : Genode::Session
|
||||
|
||||
GENODE_RPC_INTERFACE(Rpc_dataspace, Rpc_alloc_policy, Rpc_policy,
|
||||
Rpc_unload_policy, Rpc_trace, Rpc_rule, Rpc_pause,
|
||||
Rpc_resume, Rpc_subjects, Rpc_subject_info, Rpc_buffer,
|
||||
Rpc_resume, Rpc_subjects, Rpc_buffer,
|
||||
Rpc_free, Rpc_subject_infos);
|
||||
};
|
||||
|
||||
|
||||
@@ -81,7 +81,6 @@ class Genode::Trace::Session_component
|
||||
void rule(Session_label const &, Thread_name const &, Policy_id, size_t) override;
|
||||
void pause(Subject_id) override;
|
||||
void resume(Subject_id) override;
|
||||
Subject_info subject_info(Subject_id) override;
|
||||
Dataspace_capability buffer(Subject_id) override;
|
||||
void free(Subject_id) override;
|
||||
};
|
||||
|
||||
@@ -146,12 +146,6 @@ void Session_component::resume(Subject_id subject_id)
|
||||
}
|
||||
|
||||
|
||||
Subject_info Session_component::subject_info(Subject_id subject_id)
|
||||
{
|
||||
return _subjects.lookup_by_id(subject_id).info();
|
||||
}
|
||||
|
||||
|
||||
Dataspace_capability Session_component::buffer(Subject_id subject_id)
|
||||
{
|
||||
return _subjects.lookup_by_id(subject_id).buffer();
|
||||
|
||||
@@ -65,7 +65,6 @@ struct Migrate
|
||||
Signal_handler<Migrate> timer_handler { env.ep(), *this,
|
||||
&Migrate::check_traces };
|
||||
|
||||
Trace::Subject_id trace_id { };
|
||||
Affinity::Location location { };
|
||||
unsigned loc_same { 0 };
|
||||
unsigned loc_pos { 0 };
|
||||
@@ -95,13 +94,12 @@ struct Migrate
|
||||
switch (state) {
|
||||
case LOOKUP_TRACE_ID:
|
||||
{
|
||||
auto count = trace.for_each_subject_info([&](Trace::Subject_id const &id,
|
||||
auto count = trace.for_each_subject_info([&](Trace::Subject_id const &,
|
||||
Trace::Subject_info const &info)
|
||||
{
|
||||
if (info.thread_name() != "migrate")
|
||||
return;
|
||||
|
||||
trace_id = id;
|
||||
location = info.affinity();
|
||||
state = CHECK_AFFINITY;
|
||||
|
||||
@@ -116,32 +114,38 @@ struct Migrate
|
||||
}
|
||||
case CHECK_AFFINITY:
|
||||
{
|
||||
Trace::Subject_info const info = trace.subject_info(trace_id);
|
||||
|
||||
loc_same ++;
|
||||
|
||||
if ((location.xpos() == info.affinity().xpos()) &&
|
||||
(location.ypos() == info.affinity().ypos()) &&
|
||||
(location.width() == info.affinity().width()) &&
|
||||
(location.height() == info.affinity().height()))
|
||||
trace.for_each_subject_info([&](Trace::Subject_id const &,
|
||||
Trace::Subject_info const &info)
|
||||
{
|
||||
if (loc_same >= 1) {
|
||||
loc_same = 0;
|
||||
state = MIGRATE;
|
||||
if (info.thread_name() != "migrate")
|
||||
return;
|
||||
|
||||
loc_same ++;
|
||||
|
||||
if ((location.xpos() == info.affinity().xpos()) &&
|
||||
(location.ypos() == info.affinity().ypos()) &&
|
||||
(location.width() == info.affinity().width()) &&
|
||||
(location.height() == info.affinity().height()))
|
||||
{
|
||||
if (loc_same >= 1) {
|
||||
loc_same = 0;
|
||||
state = MIGRATE;
|
||||
}
|
||||
log ("[ep] .");
|
||||
return;
|
||||
}
|
||||
log ("[ep] .");
|
||||
break;
|
||||
}
|
||||
|
||||
loc_same = 0;
|
||||
location = info.affinity();
|
||||
loc_same = 0;
|
||||
location = info.affinity();
|
||||
|
||||
log("[ep] thread '", info.thread_name(), "' migrated,",
|
||||
" location=", location.xpos(), "x", location.ypos());
|
||||
log("[ep] thread '", info.thread_name(), "' migrated,",
|
||||
" location=", location.xpos(), "x", location.ypos());
|
||||
|
||||
test_rounds ++;
|
||||
if (test_rounds == 4)
|
||||
log("--- test completed successfully ---");
|
||||
});
|
||||
|
||||
test_rounds ++;
|
||||
if (test_rounds == 4)
|
||||
log("--- test completed successfully ---");
|
||||
break;
|
||||
}
|
||||
case MIGRATE:
|
||||
|
||||
Reference in New Issue
Block a user