Closed GoogleCodeExporter closed 9 years ago
Thanks for your offer to help! We'll be glad to take patches. Unfortunately,
I lost
access to a solaris box so I can't do good testing anymore, so outside patches
are
particularly important for that platform.
Storing the pid in ProcMapsIterator seems fine to me, if I understand right what
you're suggesting (I may not be). The static local variable to hold the
filename
probably won't work, as you suspect; I don't think it's safe if this iterator
is used
from multiple threads. I think the right thing to do is to make char
filename_[PATH_MAX] part of the ProcMapsIterator class for solaris, and just
write
the filename into that, and return a pointer. You'll have to document
somewhere that
each Next() invalidates the pointer in name, but I think that's true in any
case.
For instance, in windows, name points into module_, but module_ contents change
in
every call to Next().
If you are going to submit a patch, please also fill out
http://code.google.com/legal/individual-cla-v1.0.html
I'm glad you're finding this project useful for you!
Original comment by csilv...@gmail.com
on 23 Sep 2009 at 12:54
Attached is a patch. Thanks for the style tips/c++ remediation. I'm open to
criticism as this is my first patch ... produced in src/ with svn -diff -x -w.
Likewise I tested it on a fresh checkout in src/ with patch -p0.
Original comment by jeffreyp...@gmail.com
on 23 Sep 2009 at 8:36
Attachments:
OK, I've applied the patch, with some minor changes (mostly formatting). I've
attached my version below; do you mind giving it a try just to make sure I
didn't
make any mistakes? (The patch may not apply 100% cleanly, because of some other
pending changes, but should hopefully be easy to apply regardless.)
This will be in the next release.
Original comment by csilv...@gmail.com
on 16 Oct 2009 at 8:01
Attachments:
This should be fixed in perftools 1.5, just released.
Original comment by csilv...@gmail.com
on 20 Jan 2010 at 11:11
Original issue reported on code.google.com by
jeffreyp...@gmail.com
on 21 Sep 2009 at 2:16