aoyoo / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

[patch] Win32 support for heapchecker #318

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This patch fixes the following issues:

1) HeapLeakChecker::ProcMapsResult HeapLeakChecker::UseProcMapsLocked() checks 
if the module name matches *lib*.so - on Win32 we must check for *.dll instead.

2) To work with the new version of RawOpenForWriting() from issue 268, slashes 
in the profile name must be converted to backslashes.

3) Show actual executable name instead of "<your binary>".

Original issue reported on code.google.com by 5u1135t...@gmail.com on 25 Feb 2011 at 3:01

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the patch!  I'll rewrite it in a way that requires fewer #ifdefs, 
but add in the functionality.

I'm concerned about the localized code to change slashes to backslashes.  It 
seems to me that this can't be the only place we'd need to worry about things 
like that.  Shouldn't this transformation be done in RawOpenForWriting, rather 
than in the call site?

Original comment by csilv...@gmail.com on 25 Feb 2011 at 10:33

GoogleCodeExporter commented 9 years ago
Also, can you move the executable-name code to port.cc and port.h?  The best 
way to do it would be to just define char* program_invocation_name and 
short_name in port.cc, and then have an object whose global constructor stores 
the value in some static buffers and changes program_invocation_name and 
short_name to point to the static buffer.  Then you can just change 
HAVE_PROGRAM_INVOCATION_NAME to 1 in src/windows/config.h.

Original comment by csilv...@gmail.com on 26 Feb 2011 at 12:05

GoogleCodeExporter commented 9 years ago
Just checking in -- what do you think of the changes I suggested?

Original comment by csilv...@gmail.com on 7 Apr 2011 at 3:38

GoogleCodeExporter commented 9 years ago
I think your suggested changes are fine, but I have no idea when I will be able 
to look at this again.

Original comment by 5u1135t...@gmail.com on 8 Apr 2011 at 5:27

GoogleCodeExporter commented 9 years ago
OK, no worries, I have plenty of patches in that state.  Just get to it when 
you have a chance; I'll ping every few months to make sure we don't forget 
about this entirely!

Original comment by csilv...@gmail.com on 9 Apr 2011 at 3:12

GoogleCodeExporter commented 9 years ago
OK, pinging again as promised.  Have you had a chance to look at this patch 
again?

Original comment by csilv...@gmail.com on 8 Jul 2011 at 12:35

GoogleCodeExporter commented 9 years ago
A promised, pinging again on this one.

Original comment by csilv...@gmail.com on 18 Oct 2011 at 5:06

GoogleCodeExporter commented 9 years ago
Pinging again.  This will be my last ping, as I am giving up maintainership of 
perftools.

Original comment by csilv...@gmail.com on 25 Jan 2012 at 11:26

GoogleCodeExporter commented 9 years ago
Taking over the pinging process as the new maintainer :) Even just a summary on 
what specifically is left to be done here would be great. 

Original comment by chapp...@gmail.com on 21 Apr 2012 at 6:01

GoogleCodeExporter commented 9 years ago
Ping?

Original comment by chapp...@gmail.com on 11 Mar 2013 at 2:28