1 * Get heap-profile-table.cc using DeleteMatchingFiles
2 * Get heap-profile-table.cc using FillProcSelfMaps, DumpProcSelfMaps
3 * Play around with ExperimentalGetStackTrace
4 * Support the windows-level memory-allocation functions? See
5 /home/build/googleclient/earth/client/tools/memorytracking/client/memorytrace/src/memorytrace.cpp
6 /home/build/googleclient/total_recall/common/sitestep/*
7 http://www.internals.com/articles/apispy/apispy.htm
8 http://www.wheaty.net/APISPY32.zip
9 * Verify /proc/xxx/maps:
10 http://www.geocities.com/wah_java_dotnet/procmap/index.html
11 * Figure out how to edit the executable IAT so tcmalloc.dll is loaded first
12 * Use QueryPerformanceCounter instead of GetTickCount() (also for sparsehash)
15 More info on windows-level memory-allocation functions:
23 malloc, LocalAlloc and GlobalAlloc call HeapAlloc, which calls
24 VirtualAlloc when needed, which calls VirtualAllocEx (the __sbrk equiv?)
26 siggi sez: If you want to do a generic job, you probably need to
27 preserve the semantics of all of these Win32 calls:
51 kernel32.dll export functions and nt.dll export functions:
52 http://www.shorthike.com/svn/trunk/tools_win32/dm/lib/kernel32.def
53 http://undocumented.ntinternals.net/
55 You can edit the executable IAT to have the patching DLL be the
58 Most complete way to intercept system calls is patch the functions
61 Microsoft has somee built-in routines for heap-checking:
62 http://support.microsoft.com/kb/268343
66 http://msdn2.microsoft.com/en-us/library/ms712713.aspx
69 Changes I've had to make to the project file:
71 0) When creating the project file, click on "no autogenerated files"
74 1) Alt-F7 -> General -> [pulldown "all configurations" ] -> Output Directory -> $(SolutionDir)$(ConfigurationName)
75 2) Alt-F7 -> General -> [pulldown "all configurations" ] -> Intermediate Directory -> $(ConfigurationName)
77 --- For each .cc file:
78 1) Alt-F7 -> C/C++ -> General -> [pulldown "all configurations"] -> Additional Include Directives --> src/windows + src/
79 2) Alt-F7 -> C/C++ -> Code Generation -> Runtime Library -> Multi-threaded, debug/release, DLL or not
82 3) Alt-F7 -> Linker -> Input -> [pulldown "all configurations" ] -> Module Definition File -> src\windows\vc7and8.def
83 --- For binaries depending on a DLL:
84 3) Right-click on project -> Project Dependencies -> [add dll]
85 --- For static binaries (not depending on a DLL)
86 3) Alt-F7 -> C/C++ -> Command Line -> [pulldown "all configurations"] -> /D PERFTOOLS_DLL_DECL=