Based on the original Rocket Workbench on SourceForge in CVS at: https://sourceforge.net/projects/rocketworkbench
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

348 lines
16 KiB

  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. %%%% generic configureation file for %%%%
  3. %%%% the ccmalloc memory profiler %%%%
  4. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  5. %-----------------------------------------------------------------%
  6. % COPY THIS FILE TO `.ccmalloc' in your project or home directory %
  7. %-----------------------------------------------------------------%
  8. ##############################################################################
  9. ## (C) 1997-1998 Armin Biere, 1998 Johannes Keukelaar
  10. ## $Id: .ccmalloc,v 1.1.1.1 2001/07/20 03:18:59 antoine Exp $
  11. ##############################################################################
  12. %%% `%' and `#' are comments !!!!!!!
  13. % This file must be called `.ccmalloc' and is searched for in the
  14. % current directory and in the home directory of the user. If it
  15. % does not exist then the default values mentioned below are used.
  16. % It is also the currently only available user manual ;-) So here
  17. % is a reading hint. First have a look at the short one line
  18. % descriptions of each option ...
  19. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  20. % with `file' the executable is specified [a.out]
  21. % ----------------------------------------------------------------------
  22. % This should not be necessary for Linux and Solaris because the proc
  23. % file system can be used to find argv[0].
  24. %
  25. % (the rest of this comment only applies to other OS)
  26. %
  27. % For other OS you should use this option unless the executable is
  28. % in the current directory or its name is `a.out'.
  29. %
  30. % If you do not specify this then ccmalloc tries to find an executable
  31. % in the current directory that matches the running program starting
  32. % with `a.out'. For this process it must call `nm' on each executable
  33. % file in the directory which may be time consuming. With this option
  34. % you can speed up this process.
  35. %
  36. % You can also specify absolute or relative path names. This is
  37. % necessary if you do not start your program from the current directory.
  38. % But you can also simply link or name your program to `a.out'.
  39. %file FILE
  40. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  41. % `log' specify the logfile [stderr]
  42. % ----------------------------------------------------------------------
  43. % The default is to use stderr. The argument to `log' is the name of
  44. % the file you want to write to. It can also be `stdout' or `-' which
  45. % sets stdout as logfile. If the logfile is stdout or stderr and is
  46. % connected to a terminal then the output is slightly different.
  47. %
  48. % For big programs the logfile can be really big. To reduce the size
  49. % you can use a small chain length (see `chain-length' below). The other
  50. % possibility is to use compressed logfiles. This can be done by
  51. % specifying a logfile name with a `.gz' (or a `.Z') suffix. This means
  52. % that gnuzip (resp. compress) is used to compress the output.
  53. log report
  54. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  55. % `logpid' specify the logfile
  56. % ----------------------------------------------------------------------
  57. % Can be used alternatively to the `log' command if you want to use
  58. % ccmalloc for debugging parallel applications where several copies of
  59. % the program you are debugging must be run simoultaneously. In this
  60. % case you can not use `log' because you do not want to write to the same
  61. % log file. Using `logpid' uses a file name ending with the <pid> of
  62. % the process which means the name is unique even if several copies of
  63. % your program are run simoultaneously.
  64. %
  65. % If you use the compressing suffixes then the <pid> is inserted before
  66. % the suffix (e.g. `logpid ccmalloc.log.gz' uses `ccmalloc.log.<pid>.gz'
  67. % as the name for the log file).
  68. %logpid FILE
  69. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  70. % `dont-log-chain' skip info about certain chains []
  71. % ----------------------------------------------------------------------
  72. % This command may be repeated any number of times. The argument to this
  73. % command is a comma-separated list of function-or-file-and-line
  74. % specifications. Garbage allocated from a callchain that contains this
  75. % subchain anywhere will _not_ be logged.
  76. %
  77. % The comma-separated list should not contain any spaces. E.g. not:
  78. % main, foo, bar
  79. % but:
  80. % main,foo,bar
  81. % A function-or-file-and-line specification is a string followed by an
  82. % optional colon and number, for example: main or main:14 or main.c or
  83. % main.c:15. Note that the string is compared with both the function and
  84. % the file name, if available. If main.c happens to be a function name,
  85. % that will cause a match (for that string at least).
  86. % Not specifying a line number will match any line number. If line number
  87. % information is not available, anything will match!
  88. % Not specifying a name (e.g. ,,,) will match an unknown function name.
  89. % Not giving any parameters at all, will match a chain containing at least
  90. % one unknown function.
  91. %
  92. % Note that if you say
  93. % dont-log-chain wrapper.c
  94. % _nothing_ will be logged...
  95. %dont-log-chain
  96. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  97. % `only-log-chain' skip info about other chains []
  98. % ----------------------------------------------------------------------
  99. % The obvious counterpart to dont-log-chain. In this case, only matching
  100. % chains will be reported. Non-matching chains will not be reported.
  101. % Can be repeated any number of times; if the chain matches any of the
  102. % instances, it will be reported.
  103. %only-log-chain
  104. ########################################################################
  105. # #
  106. # This is the `flag' section #
  107. # #
  108. # `set FLAG' is the same as `set FLAG 1' #
  109. # #
  110. # The default values are those set below. If `silent' is disabled #
  111. # then you will find the banner in the log file (or it is listed on #
  112. # stdout or stderr). The banner describes the current settings of all #
  113. # these flags. #
  114. # #
  115. ########################################################################
  116. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  117. % with `only-count' ccmalloc only counts garbage - no call chains [0]
  118. % ----------------------------------------------------------------------
  119. % If only-count is set to one then only one additional pointer for
  120. % each allocated data is used and no call chain is generated. This is
  121. % the fasted and most space efficient mode ccmalloc can operate
  122. % in. In this mode you get at least the size of garbage produced.
  123. %
  124. % Note that `check-free-space' does not work at all with `only-count'
  125. % set and over writes (`check-overwrites') are only checked when
  126. % calling free.
  127. %set only-count 0
  128. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  129. % `load-dynlibs' load dynamic linked libraries into gdb [0]
  130. % ----------------------------------------------------------------------
  131. % If your program is linked with dynamic libraries, function and file
  132. % name information is not available for addresses in those libraries,
  133. % unless you set `load-dynlibs' to 1.
  134. %set load-dynlibs 0
  135. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  136. % `keep-deallocated-data' does not recycle deallocated data [0]
  137. % ----------------------------------------------------------------------
  138. % If you enable keep-deallocated-data then all data deallocated with
  139. % `free' (or `delete' in C++) is not given back to the free store
  140. % but stays associated with the call chain of its allocation. This is
  141. % very useful if your program does multiple deallocation of the
  142. % same data.
  143. %set keep-deallocated-data 0
  144. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  145. % `check-overwrites' detect overwrites [0]
  146. % ----------------------------------------------------------------------
  147. % If you want to detect `off by n bytes' errors you should set
  148. % `checking-overwrites' to n/4 (on 32-Bit machines).
  149. %
  150. % ccmalloc inserts a boundary above allocated data. This boundary
  151. % consists of `check-overwrites' words. If your program writes to
  152. % this area then ccmalloc can detect this (see also check-start
  153. % and check-interval). `ccmalloc' also does checking for overwrites
  154. % at non word boundaries (e.g. strcpy(malloc(strlen("hello")),"hello");)
  155. %set check-overwrites 0
  156. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  157. % `check-underwrites' detect overwrites [0]
  158. % ----------------------------------------------------------------------
  159. % same with writes below allocated data. You do not have to set this
  160. % option if you only want detect `off (below) by one' errors because
  161. % ccmalloc keeps a magic value just before the user data.
  162. %set check-overwrites 0
  163. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  164. % `check-free-space' can be used to find dangling pointers. [0]
  165. % ----------------------------------------------------------------------
  166. % A very serious type of bug is to write on data that has already been
  167. % freed. If this happens the free space management of malloc is in
  168. % trouble and you will perhaps encounter non deterministic behaviour of
  169. % your program. To test this first enable `keep-deallocated-data' and
  170. % restart your program. If the problem goes away and ccmalloc does not
  171. % report anything then you should *also* enable `check-free-space'. Now
  172. % ccmalloc checks already deallocated data for corruption.
  173. %
  174. % Note that to perform this check `keep-deallocated-data' also must
  175. % be enabled and `only-count' disabled.
  176. %set check-free-space 0
  177. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  178. % `check-interval' can be used to speed up checks [0]
  179. % ----------------------------------------------------------------------
  180. % If check-overwrite, check-underwrites or check-free-space is set then
  181. % the default is to do `write checks' when data is deallocated and
  182. % to do `free space checks' when reporting together with
  183. % `write checks' for garbage. When you want these checks to be
  184. % performed more often then you should set `check-interval' to a
  185. % positive number. This number is the interval between the number of
  186. % calls to free or malloc without performing the checks.
  187. %set check-interval 0
  188. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  189. % `check-start' can be used to speed up checks [0]
  190. % ----------------------------------------------------------------------
  191. % The flag `check-start' delays the start of checks until the given
  192. % number of calls to free and malloc have occured. Together with
  193. % `check-interval' you can use a binary search to find an aproximation
  194. % when a corruption occured! If you simply set check-interval to 1 and
  195. % check-start to 0 then this will slow done your program too much.
  196. %set check-start 0
  197. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  198. % `silent' disables banner [0]
  199. % ----------------------------------------------------------------------
  200. % If you don't want to see the banner of ccmalloc then set
  201. % `silent' to 1 (f.e. when logging to stderr)
  202. %set silent
  203. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  204. % `file-info' en/disables file and line number information [1]
  205. % ----------------------------------------------------------------------
  206. % If your program was compiled with debugging information (-g) then
  207. % ccmalloc can generate line number and file info for call chains opening
  208. % a pipe to gdb. For very big programs this method is slow. In this case
  209. % you can set `file-info' to zero and you will only get the function
  210. % names. For SunOS 4.3.1 `nm' does not `demangle' C++ identifiers
  211. % very well. So gdb is called instead but only if `file-info' is
  212. % not set to 0.
  213. %set file-info 1
  214. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  215. % `continue' if ccmalloc aborts when something weired happened [0]
  216. % ----------------------------------------------------------------------
  217. % If the free function of ccmalloc is called with an argument that does
  218. % not make sense to ccmalloc or that has already been freed then you
  219. % probably want the program to stop at this point. This is also
  220. % the default behaviour. But you can force ccmalloc also to ignore
  221. % this if you set `continue' to 1. This flag also controls the behaviour
  222. % of ccmalloc when free space is found to be corrupted or a write
  223. % boundary has been overwritten.
  224. %set continue 0
  225. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  226. % `chain-length' is the length of the maximal call chain [0 = infinite]
  227. % ----------------------------------------------------------------------
  228. % You can restrict the length of call chains by setting `chain-length'
  229. % to a number greater than zero. If `chain-length' is zero (the default)
  230. % then chains are as long as possible (on a non x86 system only call
  231. % chains with a finite maximal length can be generated). For big
  232. % programs especially if keep-deallocated-data is enabled this can
  233. % reduce the size of the log file from over 100MB to several MB!
  234. %set chain-length 0
  235. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  236. % `print-addresses' of data [0]
  237. % ----------------------------------------------------------------------
  238. % If you want to see the addresses of the allocated data (and
  239. % deallocated data if keep-deallocated-data is set to 1) set
  240. % `print-addresses' to 1.
  241. %set print-addresses 0
  242. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  243. % `print-on-one-line' shortens log file [0]
  244. % ----------------------------------------------------------------------
  245. % The default is to print function names and file/line number info
  246. % on separate lines. With `print-on-one-line' set 1 all are printed
  247. % on one line.
  248. %set print-on-one-line 0
  249. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  250. % `additional-line' enlarges readability [1]
  251. % ----------------------------------------------------------------------
  252. % When printing call chains an empty line is printed between to
  253. % call points. Set `additional-line' to 0 to disable this feature.
  254. %set additional-line 1
  255. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  256. % `statistics' enables more accurate profiling [0]
  257. % ----------------------------------------------------------------------
  258. % Calculate number of allocations and deallocations and bytes also on
  259. % a per call chain basis. This uses 4 additional pointers for each
  260. % call chain.
  261. %set statistics 0
  262. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  263. % set order for sorting of call chains [1] [1]
  264. % ----------------------------------------------------------------------
  265. % When printing the report to the log file the call chains are sorted by
  266. % default with respect to the largest accumulated garbage produced by
  267. % that call chain. This can be changed with setting `sort-by-wasted'
  268. % to 0. In this case they are sorted by the number of allocated bytes.
  269. % If you want the number of allocations (only possible if `statistics'
  270. % is enabled) as sorting criteria instead then set `sort-by-size' to 0.
  271. %set sort-by-wasted 1
  272. %set sort-by-size 1
  273. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  274. % report library chains [0]
  275. % ----------------------------------------------------------------------
  276. % Some external libraries (like libg++) have memory leaks. On some
  277. % systems even a call to printf produces a leak. ccmalloc tries to
  278. % detect this (only heuristically!) and with this flag you can control
  279. % if leaks produced by such library calls are reported.
  280. %
  281. % Since version 0.2.1 some similar effect can be achieved by using
  282. % `dont-log-chain' with no argument.
  283. %set library-chains 0
  284. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  285. % print debugging information [X] (compile time dependend)
  286. % ----------------------------------------------------------------------
  287. %set debug X
  288. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  289. % align memory on 8 byte boundary [0] (no effect on SunOS or Solaris)
  290. % ----------------------------------------------------------------------
  291. %set align-8-byte 0