| OLD | NEW |
| 1 --- COMPILING | 1 --- COMPILING |
| 2 | 2 |
| 3 This project has begun being ported to Windows. A working solution | 3 This project has begun being ported to Windows. A working solution |
| 4 file exists in this directory: | 4 file exists in this directory: |
| 5 google-perftools.sln | 5 gperftools.sln |
| 6 | 6 |
| 7 You can load this solution file into VC++ 7.1 (Visual Studio 2003) or | 7 You can load this solution file into VC++ 7.1 (Visual Studio 2003) or |
| 8 later -- in the latter case, it will automatically convert the files | 8 later -- in the latter case, it will automatically convert the files |
| 9 to the latest format for you. | 9 to the latest format for you. |
| 10 | 10 |
| 11 When you build the solution, it will create a number of unittests, | 11 When you build the solution, it will create a number of unittests, |
| 12 which you can run by hand (or, more easily, under the Visual Studio | 12 which you can run by hand (or, more easily, under the Visual Studio |
| 13 debugger) to make sure everything is working properly on your system. | 13 debugger) to make sure everything is working properly on your system. |
| 14 The binaries will end up in a directory called "debug" or "release" in | 14 The binaries will end up in a directory called "debug" or "release" in |
| 15 the top-level directory (next to the .sln file). It will also create | 15 the top-level directory (next to the .sln file). It will also create |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 | 72 |
| 73 --- WIN64 | 73 --- WIN64 |
| 74 | 74 |
| 75 The function-patcher has to disassemble code, and is very | 75 The function-patcher has to disassemble code, and is very |
| 76 x86-specific. However, the rest of perftools should work fine for | 76 x86-specific. However, the rest of perftools should work fine for |
| 77 both x86 and x64. In particular, if you use the 'statically link with | 77 both x86 and x64. In particular, if you use the 'statically link with |
| 78 libc, and replace its malloc with tcmalloc' approach, mentioned above, | 78 libc, and replace its malloc with tcmalloc' approach, mentioned above, |
| 79 it should be possible to use tcmalloc with 64-bit windows. | 79 it should be possible to use tcmalloc with 64-bit windows. |
| 80 | 80 |
| 81 As of perftools 1.10, there is some support for disassembling x86_64 |
| 82 instructions, for work with win64. This work is preliminary, but the |
| 83 test file preamble_patcher_test.cc is provided to play around with |
| 84 that a bit. preamble_patcher_test will not compile on win32. |
| 85 |
| 81 | 86 |
| 82 --- ISSUES | 87 --- ISSUES |
| 83 | 88 |
| 84 NOTE FOR WIN2K USERS: According to reports | 89 NOTE FOR WIN2K USERS: According to reports |
| 85 (http://code.google.com/p/google-perftools/issues/detail?id=127) | 90 (http://code.google.com/p/gperftools/issues/detail?id=127) |
| 86 the stack-tracing necessary for the heap-profiler does not work on | 91 the stack-tracing necessary for the heap-profiler does not work on |
| 87 Win2K. The best workaround is, if you are building on a Win2k system | 92 Win2K. The best workaround is, if you are building on a Win2k system |
| 88 is to add "/D NO_TCMALLOC_SAMPLES=" to your build, to turn off the | 93 is to add "/D NO_TCMALLOC_SAMPLES=" to your build, to turn off the |
| 89 stack-tracing. You will not be able to use the heap-profiler if you | 94 stack-tracing. You will not be able to use the heap-profiler if you |
| 90 do this. | 95 do this. |
| 91 | 96 |
| 92 NOTE ON _MSIZE and _RECALLOC: The tcmalloc version of _msize returns | 97 NOTE ON _MSIZE and _RECALLOC: The tcmalloc version of _msize returns |
| 93 the size of the region tcmalloc allocated for you -- which is at least | 98 the size of the region tcmalloc allocated for you -- which is at least |
| 94 as many bytes you asked for, but may be more. (btw, these *are* bytes | 99 as many bytes you asked for, but may be more. (btw, these *are* bytes |
| 95 you own, even if you didn't ask for all of them, so it's correct code | 100 you own, even if you didn't ask for all of them, so it's correct code |
| 96 to access all of them if you want.) Unfortunately, the Windows CRT | 101 to access all of them if you want.) Unfortunately, the Windows CRT |
| 97 _recalloc() routine assumes that _msize returns exactly as many bytes | 102 _recalloc() routine assumes that _msize returns exactly as many bytes |
| 98 as were requested. As a result, _recalloc() may not zero out new | 103 as were requested. As a result, _recalloc() may not zero out new |
| 99 bytes correctly. IT'S SAFEST NOT TO USE _RECALLOC WITH TCMALLOC. | 104 bytes correctly. IT'S SAFEST NOT TO USE _RECALLOC WITH TCMALLOC. |
| 100 _recalloc() is a tricky routine to use in any case (it's not safe to | 105 _recalloc() is a tricky routine to use in any case (it's not safe to |
| 101 use with realloc, for instance). | 106 use with realloc, for instance). |
| 102 | 107 |
| 103 | 108 |
| 104 I have little experience with Windows programming, so there may be | 109 I have little experience with Windows programming, so there may be |
| 105 better ways to set this up than I've done! If you run across any | 110 better ways to set this up than I've done! If you run across any |
| 106 problems, please post to the google-perftools Google Group, or report | 111 problems, please post to the google-perftools Google Group, or report |
| 107 them on the google-perftools Google Code site: | 112 them on the gperftools Google Code site: |
| 108 http://groups.google.com/group/google-perftools | 113 http://groups.google.com/group/google-perftools |
| 109 http://code.google.com/p/google-perftools/issues/list | 114 http://code.google.com/p/gperftools/issues/list |
| 110 | 115 |
| 111 -- craig | 116 -- craig |
| 112 | 117 |
| 113 Last modified: 6 April 2011 | 118 Last modified: 2 February 2012 |
| OLD | NEW |