Reported by Jeff at https://bugzilla.mozilla.org/show_bug.cgi?id=902587#c104 IsValidWrite is adding additional I/O by calling fstat and other stuff. This is interfering with the collection of performance data.
One possible solution would be to just get the ipc code to call the underlying write call avoiding the hook.
Another possibility that I looked into (though it's a bit iffy) is to replace fstat() with a call to pread() using the fd and passing invalid parameters for the rest. If the fd is not a file, pread() fails with ESPIPE. Otherwise pread() would fail with other errors such as EINVAL due to the bad parameters. Of course, that relies on the fact that it just so happens that the implementation of pread() does a type check on the fd before checking any of the other parameters, but nonetheless. ;-)
You need to log in before you can comment on or make changes to this bug.