Communicate traces to userspace through shared memory instead of copying.
authorSoren Sandmann <sandmann@daimi.au.dk>
Mon, 23 Oct 2006 03:46:25 +0000 (03:46 +0000)
committerSøren Sandmann Pedersen <ssp@src.gnome.org>
Mon, 23 Oct 2006 03:46:25 +0000 (03:46 +0000)
commit4dd37d092cae14c014b7874e9e107cab839d54de
tree3bdc009817ccb2d23705133a93b81732b11e93e3
parent5eb19d00faa73bba7e609300d7d38575b038de2e
Communicate traces to userspace through shared memory instead of copying.

2006-10-22  Soren Sandmann <sandmann@daimi.au.dk>

Communicate traces to userspace through shared memory instead of
copying.

* module/sysprof-module.c: Store the traces in a SysprofMmapArea.
(sysprof_mmap): Implement this method.
(sysprof_nopage): Implement this.
(sysprof_read): Just reset the tail pointer and return zero.

* module/sysprof-module.h (struct SysprofMmapArea): New
structure.

* collector.c (collector_stop): Unmap the device
(in_dead_period): New function
(on_read): Read the traces out of mmap()ed area instead of reading
them. Call read() to prevent poll() from firing.
(struct Collector): New members map_area and current.

* Makefile.am (insert-module): Prefix modprobe with /sbin

* collector.c (open_fd): mmap() the sysprof device.
ChangeLog
Makefile.am
collector.c
module/sysprof-module.c
module/sysprof-module.h