Good catch, Torsten. I stumbled across this issue a few weeks ago myself but didn't figure out a solution yet. See https://github.com/genodelabs/genode/issues/1508
On Wed, 27 May 2015 10:53:59 +0200 Torsten Frenzel <frenzel@...28...> wrote:
Hello,
currently, I explore Genode's tracing-feature and have a few questions regarding policy modules and trace buffers:
I'm working with the 15.02 release and found two examples of policy modules, called null and rpc_name. Are there other examples in branches of the repo on how to implement a custom policy module. In general what are the restrictions, when implementing a policy module?
Is it possible to extract more specific information for a certain event, for example, the name of the destination, that was called. Furthermore, the policy modules for Rpc_call and Rpc_returned events have access to a data structure of type Msgbuf_base. As far as I understood the message buffer contains the arch-depended marshalled data. Is there a generic mechanism to interpret these data in a meaningful way inside policy module or the trace monitor?
It would be helpful to accurately timestamp every recorded event with a value of a real time clock. But that would require access to service that provides such an information. Again, I cannot see how to get access to such a service from inside the policy module, because it hasn't access to the Genode runtime environment. Maybe the correct approach would be to use a fast timestamp function inside the policy module and later calculate the real time value in the trace monitor?
Is it possible to disable/enable specific types of events (, may be using the Trace::Control data structure)?
Is there a mechanism that the trace monitor is notified, when a trace-buffer is full or has reached a threshold?
When I played around with the test_trace program, I noticed that loading more than policy module into core fails. After some investigations I found that the slab_size for the constructed allocator used in the Policy_registry class for Trace::Policy objects is only 4 bytes, but Trace::Policy objects have a larger size of 26 bytes. When I changed the constructor in the session component as shown below everything works fine. So for some reason the compiler selects the Avl_node_base::Policy class in the template.
diff -r ./base/src/core/include/trace/session_component.h . 40,41c40,41
< Tslab<Trace::Policy, 4096> _policies_slab;
Tslab<Policy, 4096> _policies_slab;
Regards, Torsten
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main