mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 06:33:31 +00:00
parent
a7d170adda
commit
21e48a8e12
@ -86,8 +86,10 @@ struct Genode::Trace::Session_client : Genode::Rpc_client<Genode::Trace::Session
|
||||
return num_subjects;
|
||||
}
|
||||
|
||||
struct For_each_subject_info_result { size_t count; size_t limit; };
|
||||
|
||||
template <typename FN>
|
||||
size_t for_each_subject_info(FN const &fn)
|
||||
For_each_subject_info_result for_each_subject_info(FN const &fn)
|
||||
{
|
||||
size_t const num_subjects = call<Rpc_subject_infos>();
|
||||
size_t const max_subjects = _argument_buffer.size / (sizeof(Subject_info) + sizeof(Subject_id));
|
||||
@ -99,7 +101,7 @@ struct Genode::Trace::Session_client : Genode::Rpc_client<Genode::Trace::Session
|
||||
fn(ids[i], infos[i]);
|
||||
}
|
||||
|
||||
return num_subjects;
|
||||
return { .count = num_subjects, .limit = max_subjects };
|
||||
}
|
||||
|
||||
Policy_id alloc_policy(size_t size) override {
|
||||
|
@ -63,7 +63,7 @@ struct Genode::Trace::Connection : Genode::Connection<Genode::Trace::Session>,
|
||||
}
|
||||
|
||||
template <typename FN>
|
||||
size_t for_each_subject_info(FN const &fn)
|
||||
For_each_subject_info_result for_each_subject_info(FN const &fn)
|
||||
{
|
||||
return _retry([&] () {
|
||||
return Session_client::for_each_subject_info(fn); });
|
||||
|
@ -91,7 +91,7 @@ struct Trace_subject_registry
|
||||
|
||||
do {
|
||||
try {
|
||||
return trace.for_each_subject_info(fn);
|
||||
return trace.for_each_subject_info(fn).count;
|
||||
} catch (Genode::Out_of_ram) {
|
||||
trace.upgrade_ram(4096);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user