On Mon, May 21, 2012 at 12:10:19PM +0200, Andreas Bock wrote:
> Hello,
>
> On Sun, May 20, 2012 at 7:30 PM, Tomas Hruby <
thr...@gmail.com> wrote:
>
> > Hi,
> >
> > > We are implementing a new server in MINIX 3.2.0 for event-based profiling
> > > purposes. It is designed to receive messages from other servers and
> > > userland processes to write profiling data to a file.
> > > We are currently focusing on tracing system calls.
> > >
> > > We want to send these messages asynchronously, but have not succeeded in
> > > finding any suitable API.
> >
> > What messages do you want to send where?
> >
>
> Ideally we would like to send all types of messages to the profiling
> server. We would like to be able to insert probes in the existing servers
> that forward a copy of the messages they receive to the profiling server.
> We hope to extend this so that users may send profiling data directly to
> the server using a well-defined API.
You could tweak kernel so that it sends all the messages to your
server, but you would need to use a different mechanism than what the
current IPC allows, add a new sort of communication between the kernel
and your server. I am not sure how straight forward it would be.
> > > Furthermore, we want servers such as PM to "forward" all incoming
> > messages
> > > to our profiling server, while preserving the origin (original sender) of
> > > the message.
> > > This way we can log what processes are performing which system calls.
> > >
> > > Is there a way of retaining this information without extending the
> > message
> > > struct?
> >
> > No. The source field is set by the kernel. However, I am finishing a
> > new asynchronous messaging mechanism which bypasses kernel and allows
> > sending larger messages between two servers/drivers. It would serve
> > your purpose well, I guess. I send you the patches once I polish them,
> > hopefully in a few days, and you can be my guinea pig :)
> >
>
> This would fit our needs very well, we are looking forward to testing it. :)
Good. Just to double check, do you use recent Minix?
T.