Some issues of HeapProfile in windows

Author: alkCreated Aug 22, 2015Updated Nov 8, 2024
LabelsType-DefectPriority-MediumStatus-New

Originally reported on Google Code with ID 267

What steps will reproduce the problem?
1.download the latest release version.
2.open google-perftools.sln in VStudio9 
3.Add heap-profiler.cc into libtcmalloc_minimal.vcproj and build
4.Compile will report link error: HeapProfileTable::kMaxStackDepth is defined twice.
5. fixing the build and run one of the unit_test, the program will terminate due to
WindowsInfo:Patch() occasionally fails.
6. fixing the issue in WindowsInfo:Patch(), and define HEAPPROFILE environment variable,
the unit test will deadlock. see http://groups.google.com/group/google-perftools/browse_frm/thread/6d38023bee973335

What is the expected output? What do you see instead?
1 moving initialization of kMaxStackDepth to heap-profile-table.cc will fix build in
VStudio 9.

2 When WindowsInfo:Patch() is called, function_info_ hasn't been initialized, this
is a very strange issue. I fixd it by manually initialize it in WindowsInfo:Patch().


Please use labels and text to provide additional information.

Reported by baibaichen on 2010-09-02 01:32:05