ruby-prof 2.0.3 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +615 -607
  3. data/bin/ruby-prof +336 -336
  4. data/lib/ruby-prof/printers/abstract_printer.rb +143 -143
  5. data/lib/ruby-prof/printers/flame_graph_printer.rb +80 -78
  6. data/lib/ruby-prof/version.rb +3 -3
  7. metadata +4 -85
  8. data/Rakefile +0 -98
  9. data/docs/advanced-usage.md +0 -132
  10. data/docs/alternatives.md +0 -98
  11. data/docs/architecture.md +0 -304
  12. data/docs/best-practices.md +0 -27
  13. data/docs/getting-started.md +0 -130
  14. data/docs/history.md +0 -11
  15. data/docs/index.md +0 -45
  16. data/docs/profiling-rails.md +0 -64
  17. data/docs/public/examples/example.rb +0 -33
  18. data/docs/public/examples/generate_reports.rb +0 -92
  19. data/docs/public/examples/reports/call_info.txt +0 -27
  20. data/docs/public/examples/reports/call_stack.html +0 -835
  21. data/docs/public/examples/reports/callgrind.out +0 -150
  22. data/docs/public/examples/reports/flame_graph.html +0 -408
  23. data/docs/public/examples/reports/flat.txt +0 -45
  24. data/docs/public/examples/reports/graph.dot +0 -129
  25. data/docs/public/examples/reports/graph.html +0 -1319
  26. data/docs/public/examples/reports/graph.txt +0 -100
  27. data/docs/public/examples/reports/graphviz_viewer.html +0 -1
  28. data/docs/public/images/call_stack.png +0 -0
  29. data/docs/public/images/class_diagram.png +0 -0
  30. data/docs/public/images/dot_printer.png +0 -0
  31. data/docs/public/images/flame_graph.png +0 -0
  32. data/docs/public/images/flat.png +0 -0
  33. data/docs/public/images/graph.png +0 -0
  34. data/docs/public/images/graph_html.png +0 -0
  35. data/docs/public/images/ruby-prof-logo.svg +0 -1
  36. data/docs/reports.md +0 -151
  37. data/docs/stylesheets/extra.css +0 -80
  38. data/ruby-prof.gemspec +0 -66
  39. data/test/abstract_printer_test.rb +0 -25
  40. data/test/alias_test.rb +0 -203
  41. data/test/call_tree_builder.rb +0 -126
  42. data/test/call_tree_test.rb +0 -94
  43. data/test/call_tree_visitor_test.rb +0 -27
  44. data/test/call_trees_test.rb +0 -66
  45. data/test/duplicate_names_test.rb +0 -32
  46. data/test/dynamic_method_test.rb +0 -50
  47. data/test/enumerable_test.rb +0 -23
  48. data/test/exceptions_test.rb +0 -24
  49. data/test/exclude_methods_test.rb +0 -363
  50. data/test/exclude_threads_test.rb +0 -48
  51. data/test/fiber_test.rb +0 -195
  52. data/test/gc_test.rb +0 -104
  53. data/test/inverse_call_tree_test.rb +0 -174
  54. data/test/line_number_test.rb +0 -563
  55. data/test/marshal_test.rb +0 -144
  56. data/test/measure_allocations.rb +0 -26
  57. data/test/measure_allocations_test.rb +0 -1511
  58. data/test/measure_process_time_test.rb +0 -3286
  59. data/test/measure_times.rb +0 -56
  60. data/test/measure_wall_time_test.rb +0 -774
  61. data/test/measurement_test.rb +0 -82
  62. data/test/merge_test.rb +0 -146
  63. data/test/method_info_test.rb +0 -100
  64. data/test/multi_printer_test.rb +0 -52
  65. data/test/no_method_class_test.rb +0 -15
  66. data/test/pause_resume_test.rb +0 -171
  67. data/test/prime.rb +0 -54
  68. data/test/prime_script.rb +0 -6
  69. data/test/printer_call_stack_test.rb +0 -28
  70. data/test/printer_call_tree_test.rb +0 -30
  71. data/test/printer_flame_graph_test.rb +0 -82
  72. data/test/printer_flat_test.rb +0 -99
  73. data/test/printer_graph_html_test.rb +0 -62
  74. data/test/printer_graph_test.rb +0 -42
  75. data/test/printers_test.rb +0 -162
  76. data/test/printing_recursive_graph_test.rb +0 -81
  77. data/test/profile_test.rb +0 -101
  78. data/test/rack_test.rb +0 -103
  79. data/test/recursive_test.rb +0 -796
  80. data/test/scheduler.rb +0 -367
  81. data/test/singleton_test.rb +0 -39
  82. data/test/stack_printer_test.rb +0 -61
  83. data/test/start_stop_test.rb +0 -106
  84. data/test/test_helper.rb +0 -24
  85. data/test/thread_test.rb +0 -229
  86. data/test/unique_call_path_test.rb +0 -123
  87. data/test/yarv_test.rb +0 -56
data/CHANGELOG.md CHANGED
@@ -1,607 +1,615 @@
1
- # Changelog
2
-
3
- ## 2.0.3 (2026-02-28)
4
- * Remove unnecessary visited set from FlameGraphPrinter (call tree is always acyclic)
5
- * Remove sort_by in FlameGraphPrinter to preserve natural call order
6
- * Add `max_depth` option to FlameGraphPrinter, CallStackPrinter, CallInfoPrinter, and CallTreeVisitor
7
- * Add documentation covering call tree construction and recursion handling
8
-
9
- ## 2.0.2 (2026-02-17)
10
- * Fix bin/ruby-prof passing printer options as positional arguments instead of keyword arguments
11
-
12
- ## 2.0.1 (2026-02-16)
13
- * Convert bin/ruby-prof endings from CRLF to LF
14
-
15
- ## 2.0.0 (2026-02-13)
16
- ### Features
17
- * Ruby 4.0 support.
18
- * Add flame graph visualizations with icicle mode toggle
19
- * Lots of documentation updates!
20
- * Apply consistent styling across all reports
21
- * Add `Profile#measure_mode_name` method for human-friendly measurement mode names (e.g., "Wall Time" instead of "wall_time")
22
- * Fix DotPrinter generating self-referencing edges (was using callers instead of callees)
23
- * Add Graphviz Online viewer link for dot output
24
-
25
- ### Backwards Incompatible Changes
26
- * Removed `RubyProf::MEMORY` measurement mode (no longer works on Ruby 4.0+)
27
- * Rremove compatibility API that was scheduled for removal in 2023
28
- * Printer options now use keyword arguments instead of an options hash. For example:
29
- ```ruby
30
- # Before:
31
- printer.print(STDOUT, :min_percent => 2, :sort_method => :self_time)
32
- # After:
33
- printer.print(STDOUT, min_percent: 2, sort_method: :self_time)
34
- ```
35
-
36
- ## 1.7.2 (2025-05-21)
37
- * Fix compiling on Ubuntu and Arch Linux
38
- * Update tests for Ruby 3.4
39
- * Remove tests for Ruby 3.1
40
- * Update MacOS to use clock_gettime (same as Linux) instead of proprietary mach_absolute_time API
41
- * Add CMake support
42
-
43
- ## 1.7.1 (2024-10-19)
44
- * Fix crashes when calling merge due to inconsistent method keys (Chris Heald)
45
-
46
- ## 1.7.0 (2024-01-07)
47
- * Add support for ruby 3.3.* (Charlie Savage)
48
- * Remove support for ruby 2.7.* (Charlie Savage)
49
- * Fix crash caused by referencing Profile Ruby objects from Method objects that were being moved
50
- by GC compaction (Charlie Savage)
51
-
52
- ## 1.6.3 (2023-04-20)
53
- * Remove debug code unintentionally left in ruby-prof command line program (Charlie Savage)
54
-
55
- ## 1.6.2 (2023-04-17)
56
- * Fix Profile#merge! implementation (asksurya)
57
- * Fix ruby-prof command line program (Charlie Savage)
58
- * Added CMakeLists.txt file (Charlie Savage)
59
-
60
- ## 1.6.1 (2023-02-21)
61
- * Fix loading C extension for MacOS (Charlie Savage)
62
-
63
- ## 1.6.0 (2023-02-20)
64
- * Add support for Ruby's compacting garbage collector (Charlie Savage)
65
- * Add rbs signature files (Charlie Savage)
66
- * Update rack adapter used for profiling Rails to include latest ruby-prof features (Charlie Savage)
67
- * Add warnings for deprecated methods (Charlie Savage)
68
- * Update tests to not use deprecated methods (Charlie Savage)
69
- * Improve tests on OSX (Charlie Savage)
70
-
71
- ## 1.5.0 (2023-02-06)
72
- * Add new Profile#merge! method that merges results for threads/fibers that share the same root method (Charlie Savage)
73
- * Expand API to allow creation of +Measurement+, +CallTree+, +MethodInfo+ and +Thread+ instances. This
74
- was done to make is possible to write tests for the new Profile#merge! functionality (Charlie Savage)
75
-
76
- ## 1.4.5 (2022-12-27)
77
- * Look for ruby_prof extension built on install in the lib directory (Charlie Savage)
78
- * Added Ruby 3.2.0 build for mingw-urct
79
-
80
- ## 1.4.4 (2022-12-11)
81
- * Update tests for Ruby 3.1 (Charlie Savage)
82
- * When tracing allocations always use the RUBY_INTERNAL_EVENT_NEWOBJ trace event. Previously GC stats could also be used, but that includes the creation of internal T_IMEMO objects makes reviewing results confusing (Charlie Savage)
83
- * Remove :profile option that lets a user set the prefix on callgrind output files since KCacheGrind will not automatically show these files in its open dialog. Fixes #313. (Charlie Savage)
84
- * Don't expose threads to Ruby that don't have a call tree. This can happen when a user is profiling memory usage and then sends a signint to the profiled process. New objects will be created in a new thread, but no method enter/exit trace events are generated by Ruby. Thus the thread has no call tree. Fixes #312 (Charlie Savage)
85
- * Update github Actions - change 3.0 to '3.0', add Windows mswin (MSP-Greg)
86
- * Add Ruby 3.1 to test matrix (Charlie Savage)
87
- * Use normal weight text instead of bold in call strack printer output. Fixes #297 (Charlie Savage)
88
- * Update VC project to Ruby 3.1 and Visual Studio 2022 (Charlie Savage)
89
- * Fix marshaling of profile measure. Fixes #315 (Charlie Savage)
90
- * CI: Omit duplicate 'bundle install'. PR #309 (Olle Jonsson)
91
- * Fix typo. s/perecent/percent/ (Paarth Madan)
92
- * Remove support for Ruby 2.5 and 2.6 which are now end of life (Charlie Savage)
93
-
94
- ## 1.4.3 (2021-02-16)
95
- * Remove trailing spaces (sergioro)
96
- * Load "ruby-prof.so" with require_relative (sergioro)
97
- * Use same file permissions for all test files (sergioro)
98
- * Create tmp directory for test output (sergioro)
99
- * Update git-ignore to add mkmf log (sergioro)
100
- * Fix minitest warning about using MT_CPU instead of N (sergioro)
101
- * Fix minitest warning "Use assert_nil if expecting nil (sergioro)
102
- * Add xcode project (Charlie Savage)
103
- * Update test for Ruby 3.0 (Charlie Savage)
104
- * Remove Ruby 2.4 support since it is no longer maintained (Charlie Savage)
105
- * Replace travis status badge with github status badge (Charlie Savage)
106
-
107
- ## 1.4.2 (2020-11-3)
108
- * Do NOT use Ruby 2.7.0 and 2.7.1 with ruby-prof. A bug in those versions of ruby causes ruby-prof to
109
- not work. Version 2.7.2 works correctly.
110
- * Fix crash caused be reallocating an internal stack that keeps tracks of frames *after* getting a reference to the
111
- top frame in the stack (Charlie Savage).
112
- * Fix bug where the flat printer did not correctly report the correct measurement mode.
113
-
114
- ## 1.4.1 (2020-05-14)
115
- * Fix compiling on older versions of gcc that do not default to c99 (Charlie Savage)
116
-
117
- ## 1.4.0 (2020-05-12)
118
- * API change - remove merge_fibers support since it resulted in incorrect results or crashes (Charlie Savage)
119
- * Fix crash when profiling memory usage (Charlie Savage)
120
- * When tracing execution correctly print out newobj tracepoint events (Charlie Savage)
121
- * Remove no longer needed code for building extensions (Charlie Savage)
122
-
123
- ## 1.3.2 (2020-04-19)
124
- * Fix rack profiler so it is thread safe (Charlie Savage)
125
- * Fix loading of prebuilt binaries on mingw64 to use Ruby's major and minor version (Charlie Savage)
126
-
127
- ## 1.3.1 (2020-03-11)
128
- * Add max_percent and filter_by options to flat printer (Sean McGivern)
129
- * Include binary in mingw64 build (Charlie Savage)
130
-
131
- ## 1.3.0 (2020-02-22)
132
- * Update C code to use newer RTypedData API versus older RData API.
133
- * Update C code to use rb_cObject versus the older, deprecated, rb_cData.
134
- * Update memory management - CallInfo's now keep alive their owning Profile instances. Fixes crashes that
135
- could happen in rare instances.
136
-
137
- ## 1.2.0 (2020-01-23)
138
- * Fix call stack printer broken in version 1.0.0 (Charlie Savage)
139
- * Ruby 2.7.0 support (Charlie Savage)
140
- * Switch to Windows high precision timer for measuring wall time (Charlie Savage)
141
- * Much better support for reverse call trees - if you start RubyProf at the bottom
142
- of a call tree it will correctly calculate times as it ascends the tree (Charlie Savage)
143
- * Port AggregateCallInfo from Ruby to C to increase performance
144
- * API change - CallInfo has been renamed CallTree
145
- * Fix crashes on Ruby 2.4.*
146
-
147
- ## 1.1.0 (2019-12-14)
148
- Changes
149
-
150
- * Reimplement merge_fibers (Charlie Savage)
151
- * Fix crash caused by threads being freed when profiles are freed (Charlie Savage)
152
-
153
- ## 1.0.0 (2019-07-29)
154
- ruby-prof's development stretches all the way back to 2005. Fourteen years later, it seems time for version 1.0!
155
- Version 1.0 is a significant update that greatly improves the internals of ruby-prof and adds a number of improvements.
156
-
157
- Changes (Charlie Savage):
158
-
159
- * Profiling is significantly faster - 5x in some cases
160
- * Recursive profiles are finally handled correctly. Yeah!!!
161
- * Redesigned reports (Chirs Whitefield)
162
- * New documentation website (https://ruby-prof.github.io)
163
- * The ability to measure allocations and memory usage using a standard (unpatched) version of ruby
164
- * The ability to save and reload profiling results for later analysis
165
- * The ability track object allocations
166
-
167
- At the same time, it was also time to remove old code and deprecated methods. These changes include (Charlie Savage):
168
-
169
- * Drop support for old versions of ruby. Currently 2.4 and up are required.
170
- * Remove support for method elimination (instead use method exclusion).
171
- * Remove the CPU_TIME measurement mode since it duplicates the PROCESS_TIME mode and required inline assembly code
172
- * Remove the GC_TIME and GC_RUNS measurement modes since they required patched ruby versions. In modern ruby it is possible to reimplement this functionality, but it does not seem of that much value (shout out if you want it back).
173
- * Merge the RubyProf::FlatPrinterWithLineNumbers printer into RubyProf::FlatPrinter.
174
- * Removed support for RUBY_PROF_EDITOR_URI environment variable that specified the link scheme. This features was more confusing then helpful.
175
-
176
-
177
- ## 0.18.0 (2019-05-27)
178
- ### Fixes
179
- * Fix grouping by thread/fiber (Charlie Savage)
180
- * Fix include/exclude thread checking (Charlie Savage)
181
- * Fix failing tests (Charlie Savage)
182
- * Fix grouping by thread_id and fiber_id (Charlie Savage)
183
- * Update Visual Studio solution to 2019 (Charlie Savage)
184
- * Adjust AbstractPrinter#editor_uri so it's possible to disable uri (Maciek Dubiński)-
185
- * Fix -X/--exclude-file option not working (John Lindgren)
186
- * Different directory for middleware output in readme (Aldric Giacomoni)
187
- * Fixing spelling mistakes and typos (David Kennedy and Roger Pack)
188
- * Add "allow_exceptions" option to Profile (Ryan Duryea)
189
- * Update readme (Jan Piotrowski, Nathan Seither, victor-am)
190
- * Travis updates (Niocals Leger and Charlie Savage)
191
- * Fix NewRelic module detection in exclude_common_methods! (Ben Hughes)
192
-
193
- ## 0.17.0 (2017-12-17)
194
- * Changed method/class names produced by the callgrind printer to be more kcachegrind
195
- friendly (thx to Nelson Gauthier and Ben Hughes, see https://github.com/ruby-prof/ruby-prof/pull/200).
196
- * Recursive instances of a method call are now dtected during profiling (thx to Nelson Gauthier and
197
- Ben Hughes, see https://github.com/ruby-prof/ruby-prof/pull/201).
198
- * Methods can now be ignored during a profiling run instead of eliminating them
199
- after a profile run, which has been deprecated (thx to Nelson Gauthier and Ben Hughes,
200
- see https://github.com/ruby-prof/ruby-prof/pull/202).
201
- * Use RUBY_PROF_EDITOR_URI=emacs to open source code links in the one true editor.
202
- (thx Alexander Egorov, see https://github.com/ruby-prof/ruby-prof/pull/183 and
203
- https://github.com/typester/emacs-handler).
204
- * Fixed that calling profile.stop would stop profiling all active profiling runs.
205
- * Fixed that remembering parent call frame pointer before stack reallocation could cause a segfault.
206
-
207
- ## 0.16.2 (2016-08-25)
208
- * fixed incorrect setting of RUBY_VERSION macro
209
-
210
- ## 0.16.1 (2016-08-24)
211
- * fixed compile problem with ruby 2.1.10
212
-
213
- ## 0.16.0 (2016-08-24)
214
- * ruby-prof can now be installed if ruby has been compiled with --disable-gems or
215
- RUBYOPT includes --disable-gems (thx to Arthur Nogueira Neves)
216
- * Profile.new now accepts and prefers an options hash:
217
- - measure_mode: one of the RubyProf measure mode constants
218
- - exclude_threads: an array of threads to ignore when collecting profile data
219
- - include_threads: an array of threads to include when collecting profile data
220
- - merge_fibers: whether or not to merge the profile data for all fibers under their creating thread
221
- * overhauled printer for cachegrind profiles:
222
- - profile data for each thread dumped to a separate file, as kcachegrind does not
223
- fully implement the cachegrind specification
224
- - this required a change in interface: it's now necessary to specify a directory
225
- where to dump the cachegrind files
226
- - naming convention for cachegrind files changed so that kcachegrind shows them
227
- all in the open dialog
228
- * improved Rack middleware:
229
- - it's now possible to use the MultiPrinter
230
- - new option ignore_existing_threads: will ignore all prexisiting threads
231
- when profiling a request, except the thread perfoming the request.
232
- - new option request_thread_only: will ignore all preexisting threads, but also
233
- all threads spwaned during the execution of the rack request.
234
- - new option merge_fibers: whether or not to merge the profile data for all fibers under their creating thread
235
- * fixed setting threshold bug when displaying stack profiles (thx to Michal Konarski)
236
- * code related to printing profiles is now autoloaded for efficiency (thx to Dave Gynn)
237
-
238
- ## 0.15.9 (2015-12-08)
239
- * rack profiler now supports lambdas for generating profile paths (thx to Jean Rougé)
240
- * fixed a bug when printing graph profiles
241
-
242
- ## 0.15.8 (2015-04-24)
243
- * added missing assets to gem build
244
- * fixed randomly failing test
245
-
246
- ## 0.15.7 (2015-04-23)
247
- * html profiles are now single page (thx to Thomas Leishman)
248
-
249
- ## 0.15.6 (2015-02-22)
250
- * improved upon computing children time in graph printers
251
-
252
- ## 0.15.5 (2015-02-22)
253
- * changed output format of flat_printer_with_line_number
254
- * support using multi printer from command line (Dov Murik)
255
-
256
- ## 0.15.4 (2015-02-14)
257
- * using env variable to specify mesaurement mode work again
258
- * measuring memory/object allocations works for 2.1 adn 2.2 again
259
-
260
- ## 0.15.3 (2015-01-16)
261
- * support ruby 2.2.0
262
-
263
- ## 0.15.2 (2014-05-20)
264
- * rack middleware creates print dir for profile result (Neng)
265
-
266
- ## 0.15.1 (2014-05-20)
267
- * added license to gemspec
268
-
269
- ## 0.15.0 (2014-05-02)
270
- * improved cpu time measurement (Charlie Somerville)
271
-
272
- ## 0.14.2 (2014-01-05)
273
- * hopefully fixed compile problem under Windows
274
-
275
- ## 0.14.0 (2014-01-02)
276
- * support ruby 2.1.0
277
- * dropped support for 1.8.x, 1.9.1 and 1.9.2
278
-
279
- ## 0.13.1 (2013-12-14)
280
- * speed up for displaying large call stacks (Benjamin Quoming)
281
-
282
- ## 0.13 (2013-03-10)
283
- * support fibers on 1.9.x+
284
- * improved display for very wide call stacks (Sammy Larbi)
285
-
286
- ## 0.12.2 (2013-02-13)
287
- * Fixed segfault when using falcon or railsexpress patches for 1.9.3
288
-
289
- ## 0.12.1 (2013-01-07)
290
- * Add back in pause/resume support since Rails uses it
291
-
292
- ## 0.12.0 (2013-01-06)
293
- * Ruby 2.0.0 support (Charlie Savage)
294
- * Fix issue where profiling results could exceed 100% if profile code had multiple top level methods (Charlie Savage)
295
- * Replaced RubyProf::Thread#top_method with RubyProf::Thread#top_methods (Charlie Savage)
296
- * Added RubyProf::Thread#total_time (Charlie Savage)
297
- * Remove the -r and -e command line options. If you need specific libraries or code profiled then add them
298
- to your code (Charlie Savage).
299
- * Rewrite ruby-prof script to be more self-contained (Gary Weaver)
300
- * Fix list formatting in readme (Thilo Rusche)
301
- * Remove pause/resume support since its buggy and complicates the code
302
-
303
- ## 0.11.3 (2012-12-27)
304
- * Prefix c functions with prof_ to avoid name conflicts (Kenta Murata)
305
- * Update ruby-prof script to avoid seg faults (Gary Weaver)
306
- * Rakefile updates (Roger Pack)
307
- * Fix regexp file reading (Gilbert Roulot)
308
- * Update documentation (Timo Schilling)
309
- * Fix up ruby warnings (Mike Gehard)
310
- * Remove duplicate code (Chas Lemley)
311
-
312
-
313
- ## 0.11.2 (2012-05-06)
314
- * Fix compile issue with BOOL. Should be _Bool for C99.
315
-
316
-
317
- ## 0.11.1 (2012-05-06)
318
- * Added option --exclude-common-callbacks, plus exclude #map and #inject in common cycles (Vasily Fedoseyev)
319
- * Add option --exclude-common-cycles to exclude common iterators (Vasily Fedoseyev)
320
- * Allow method elimination from command line via '-x' and '-X' keys (Vasily Fedoseyev)
321
-
322
-
323
- ## 0.11.0 (2012-05-05)
324
- * Fix pause/resume so it actually works and add tests (David Barri)
325
- * Resume now returns the result of the block when given (David Barri)
326
- * Make recursive method explanation more clear (Charlie Savage)
327
- * Fix ruby warnings (Charlie Savage)
328
- * Toggle GC.enable_stats when profiling for memory to get the data (Vasily Fedoseyev)
329
- * Fix patched ruby support and remove some warnings (Vasily Fedoseyev)
330
- * Fix tests on 1.8.7 (rogerdpack)
331
-
332
-
333
- ## 0.11.0.rc3 (2012-03-26)
334
- * Include missing files in gemspec (Charlie Savage).
335
-
336
-
337
- ## 0.11.0.rc2 (2012-03-25)
338
- * Lots of improvements to Rack handler - this can be used to profile requests
339
- in Rails and other rack-based ruby web frameworks (Charlie Savage).
340
- * Reimplemented handling of recursive calls using CallInfoVisitor (Charlie Savage).
341
- * Fix bug where child times were not correctly reported in complicated
342
- call graphs with recursion like in frameworks like Rails (Charlie Savage).
343
- * Add in recursive call information to Flat, Graph and Graph HTML reports (Charlie Savage).
344
- * Add in new thread class add added RubyProf::Thread#top_method to
345
- make report generation easier (Charlie Savage).
346
- * Add in CallInfoVisitor class to make it easy to iterate over a call graph (Charlie Savage).
347
- * Add in CallInfoPrinter to make it visualize RubyProf's internal call graphs (Charlie Savage).
348
- * Significant updates to documentation (Charlie Savage).
349
- * More c code cleanup (Charlie Savage).
350
-
351
- ## 0.11.0.rc1 (2012-03-24)
352
- * Big internal refactoring of C code to make RubyProf easier to understand and extend (Charlie Savage).
353
- * Profile results are now returned as instances of a new class RubyProf::Profile. The old api
354
- is supported via a compatability layer that at some point will be deprecated. (Charlie Savage).
355
- * On Windows, use QueryPerformanceCounter and QueryPerformanceFrequency to measure CPU time instead
356
- of rdtsc. This change is based on Microsoft's recommendation (Charlie Savage).
357
- * On Windows use GetProcessTimes to return real PROCESS_TIME times instead of wall times (Charlie Savage).
358
- * Split out tests for each time of measurement (cpu_time, process_time, etc.) (Charlie Savage).
359
- * Dropped support for Ruby 1.8.4 and 1.8.6 and 1.9.0 (Charlie Savage).
360
- * Added support for sorting results by total, self, wait and child times (Jan Suchal)
361
- * Added tests for sorting behaviour & removed options from constructor to print method (Jan Suchal)
362
- * Fix line number tests due to changes at top of file (Charlie Savage).
363
- * Add encoding statement to top of all files for Ruby 1.9.x compatability (Charlie Savage).
364
- * Add def file for VC to avoid the whole declspec annoyance (Charlie Savage).
365
- * Update test suite to ensure current working directory is correct (Charlie Savage).
366
- * Modernize gem file and remove various custom/home grown solutions that aren't needed anymore (Charlie Savage).
367
- * Remove custom mingw build scripts, use rake compiler instead (Charlie Savage).
368
- * Fixes for compiling with VC 2010 (Charlie Savage).
369
-
370
- ## 0.10.8 (2011-07-06)
371
- * 1.9.3 super class (Roger Pack)
372
-
373
- ## 0.10.7 (2011-05-09)
374
- * Fix a bug with REE's GC stats. Issue #53 [thanks graaff]
375
-
376
- ## 0.10.6 (2011-04-29)
377
- * Slightly more normalized url for linux/windows links to files.
378
-
379
- ## 0.10.5 (2011-04-20)
380
- * 1.8.6 compat for -v command (bug fix)
381
-
382
- ## 0.10.4 (2011-04-20)
383
- * Faster load time for ruby-prof itself.
384
-
385
- ## 0.10.3
386
- * Can cleanly load before rubygems now.
387
-
388
- ## 0.10.2
389
- * Fix for 1.9.2, os x for latest commits (thanks skaes!)
390
-
391
- ## 0.10.1
392
- * Fix bug in linux wall time, also load with only relative paths so that you can use it to benchmark rubygems startup overhead,
393
- itself.
394
-
395
- ## 0.10.0
396
- * Some rdoc changes, for linux wall time attempt to use higher granularity (thanks to all the contributors for this round!)
397
-
398
- ## 0.9.2
399
- * Make graphviz work on 1.8.6
400
- * Roll back some 1.9.2 optimizations until I can figure out what caused them.
401
-
402
- ## 0.9.1
403
- * Add a graphviz output
404
-
405
- ## 0.9.0
406
- * measurements for recursive methods are now correct
407
- * gave up on splitting up recursive methods according to call depth
408
- * made it possible to eliminate methods from profiling results
409
- * new printer for call stack visualization
410
- * new printer to print several profiles in one run
411
- * HTML profiles contain Textmate links so you can jump to the source code easily
412
- * producing an event log is now a runtime option
413
-
414
- ## 0.7.10 (2009-01-22)
415
- * fix SEGFAULT in 1.9
416
- * add new printer flat_printer_with_line_numbers
417
-
418
- ## 0.7.7 (2009-01-13)
419
- * "fix" multi threading support for 1.9 http://redmine.ruby-lang.org/issues/show/2012
420
- * speedups
421
-
422
- ## 0.7.6 (2009-12-31)
423
- * fix some tests for 1.9 (no real code changes)
424
-
425
- ## 0.7.5 (2009-12)
426
- * fix a GC collection bug (nobu's patch).
427
- * correctly report recursive call depths (Kevin Scaldeferri).
428
- * sort methods on output (Kevin Scaldeferri).
429
-
430
- ## 0.7.3 (2008-12-09)
431
- * Fixed compile error with new x86_64 code using GCC.
432
-
433
- ## 0.7.2 (2008-12-08)
434
- * Fixed major bug in printing child methods in graph reports.
435
-
436
- * Fixes for supporting x86_64 machines (Diego Pettenò)
437
-
438
-
439
- ## 0.7.1 (2008-11-28)
440
- * Added new AggregateCallTree class for printers to
441
- make results easier to read. Take this call sequence
442
- for example:
443
-
444
- A B C
445
- | | |
446
- Z A A
447
- | |
448
- Z Z
449
-
450
- By default, ruby-prof will show that Z was called by 3 separate
451
- instances of A. In an IDE that is helpful but in a text report
452
- it is not since it makes the report much harder to read.
453
- As a result, printers now aggregate together callers (and children),
454
- matching ruby-prof's output from versions prior to 0.7.0.
455
-
456
- * Fixes for supporting x86_64 machines (Matt Sanford)
457
-
458
-
459
- ## 0.7.0 (2008-11-04)
460
-
461
- ### Features
462
- * Added two new methods - RubyProf.resume and RubyProf.pause.
463
- RubyProf.resume takes an optional block, which ensures that
464
- RubyProf.pause is called. For example:
465
-
466
- 10.times do |i|
467
- RubyProf.resume do
468
- # Some long process
469
- end
470
- end
471
-
472
- result = RubyProf.stop
473
-
474
- * Added support for profiling tests that use Ruby's built-in
475
- unit test framework (ie, test derived from
476
- Test::Unit::TestCase). To enable profiling simply add
477
- the following line of code to your test class:
478
-
479
- include RubyProf::Test
480
-
481
- By default, profiling results are written to the current
482
- processes working directory. To change this, or other
483
- profiling options, simply modify the PROFILE_OPTIONS hash
484
- table as needed.
485
-
486
- * Used the new support for profiling test cases to revamp
487
- the way that Rails profiling works. For more information
488
- please refer to RubyProf's documentation.
489
-
490
- * Keep track of call stack for each method to enable more
491
- powerful profile visualizations in Integrated Development
492
- Environments (Hin Boean, work supported by CodeGear).
493
-
494
- * Expose measurements to Ruby (Jeremy Kemper).
495
-
496
- * Add support for additional memory measurements modes in Ruby 1.9 (Jeremy Kemper).
497
-
498
- * Add support for Lloyd Hilaiel's Ruby patch for measuring total heap size.
499
- See http://lloydforge.org/projects/ruby. (Jeremy Kemper).
500
-
501
-
502
- ### Fixes
503
- * RubyProf.profile no longer crashes if an exception is
504
- thrown during a profiling run.
505
-
506
- * Measure memory in fractional kilobytes rather than rounding down (Jeremy Kemper)
507
-
508
-
509
- ## 0.6.0 (2008-02-03)
510
-
511
- ruby-prof 0.6.0 adds support for Ruby 1.9 and memory profiling.
512
-
513
- ### Features
514
- * Added support for ruby 1.9 (Shugo Maeda)
515
- * Added support for outputting printer results to a String, Array or IO
516
- object (Michael Granger)
517
- * Add new memory profiling mode. Note this mode depends on a
518
- patched Ruby interpreter (Alexander Dymo)
519
-
520
- ### Fixes
521
- * Improvements to GraphHtmlPrinter including updated documentation,
522
- fixes for min_time support, ability to specify templates using
523
- strings or filenames, and table layout fixes (Makoto Kuwata)
524
- * Fixes to scaling factor for calltrees so that precision is not lost
525
- due to the conversion to doubles (Sylvain Joyeux)
526
- * Changed constant ALLOCATED_OBJECTS to ALLOCATIONS in the C code to
527
- match the Ruby code (Sylvain Joyeux)
528
- * Added support for calltree printer to ruby-prof binary script (Sylvain Joyeux)
529
- * Fix support for the allocator measure mode to extconf.rb (Sylvain Joyeux)
530
- * Honor measure mode when specified on the command line (Sylvain Joyeux)
531
- * Sorting of methods by total time was incorrect (Dan Fitch, Charlie Savage)
532
- * Fix ruby-prof to work with the latest version of GEMS (Alexander Dymo)
533
- * Always define MEASURE_CPU_TIME and MEASURE_ALLOCATIONS in Ruby code, but
534
- set their values to nil if the functionality is not available.
535
-
536
-
537
- ## 0.5.2 (2007-07-19)
538
-
539
- ruby-prof 0.5.2 is a bug fix release.
540
-
541
- ### Fixes
542
- * Include missing rails plugin
543
-
544
-
545
- ## 0.5.1 (2007-07-18)
546
-
547
- ruby-prof 0.5.1 is a bug fix and performance release.
548
-
549
- ### Performance
550
- * Significantly reduced the number of thread lookups by
551
- caching the last executed thread.
552
-
553
- ### Fixes
554
- * Properly escape method names in HTML reports
555
- * Fix use of -m and --min-percent command line switches
556
- * Default source file information to ruby_runtime#0 for c calls
557
- * Moved rails_plugin to top level so it is more obvious
558
- * Updated rails_plugin to write reports to the current
559
- Rails log directory
560
- * Added additional tests
561
-
562
-
563
- ## 0.5.0 (2007-07-09)
564
-
565
- ### Features
566
- * Added support for timing multi-threaded applications
567
- * Added support for 64 bit systems (patch from Diego 'Flameeyes' Petten)
568
- * Added suport for outputting data in the format used by
569
- KCacheGrind (patch from Carl Shimer)
570
- * Add filename and line numbers to call tree information (patch from Carl Shimer)
571
- * Added Visual Studio 2005 project file.
572
- * Added replace-progname switch, als rcov.
573
- * Added better support for recursive methods
574
- * Added better support for profiling Rails applications
575
-
576
- ### Fixes
577
- * Fixes bug when the type of an attached object (singleton) is inherited
578
- from T_OBJECT as opposed to being a T_OBJECT (identified by Francis Cianfrocca)
579
- * ruby-prof now works in IRB.
580
- * Fix sort order in reports.
581
- * Fixed rdoc compile error.
582
- * Fix tabs in erb template for graph html report on windows.
583
-
584
- ## 0.4.1 (2006-06-26)
585
-
586
- ### Features
587
- * Added a RubyProf.running? method to indicate whether a profile is in progress.
588
- * Added tgz and zip archives to release
589
-
590
- ### Fixes
591
- * Duplicate method names are now allowed
592
- * The documentation has been updated to show the correct API usage is RubyProf.stop not RubyProf.end
593
-
594
-
595
- ## 0.4.0 (2006-06-16)
596
- ### Features
597
- * added support for call graphs
598
- * added support for printers. Currently there is a FlatPrinter,
599
- GraphPrinter and GraphHtmlPrinter.
600
- * added support for recursive methods
601
- * added Windows support
602
- * now packaged as a RubyGem
603
-
604
- ### Fixes
605
- * Fixes bug where RubyProf would crash depending on the
606
- way it was invoked - for example, it did not run when
607
- used with Arachno Ruby's customized version of Ruby.
1
+ # Changelog
2
+
3
+ ## 2.0.5 (2026-06-21)
4
+ * Fix FlameGraphPrinter crashing with `JSON::NestingError` on deep call trees (issue #353)
5
+ * Fix link to API documentation (issue #351)
6
+
7
+ ## 2.0.4 (2026-03-03)
8
+ * Fix NoMethodError when sort_method is nil (issue #349)
9
+ * Fix broken source_code_uri on rubygems.org (issue #350)
10
+
11
+ ## 2.0.3 (2026-02-28)
12
+ * Remove unnecessary visited set from FlameGraphPrinter (call tree is always acyclic)
13
+ * Remove sort_by in FlameGraphPrinter to preserve natural call order
14
+ * Add `max_depth` option to FlameGraphPrinter, CallStackPrinter, CallInfoPrinter, and CallTreeVisitor
15
+ * Add documentation covering call tree construction and recursion handling
16
+
17
+ ## 2.0.2 (2026-02-17)
18
+ * Fix bin/ruby-prof passing printer options as positional arguments instead of keyword arguments
19
+
20
+ ## 2.0.1 (2026-02-16)
21
+ * Convert bin/ruby-prof endings from CRLF to LF
22
+
23
+ ## 2.0.0 (2026-02-13)
24
+ ### Features
25
+ * Ruby 4.0 support.
26
+ * Add flame graph visualizations with icicle mode toggle
27
+ * Lots of documentation updates!
28
+ * Apply consistent styling across all reports
29
+ * Add `Profile#measure_mode_name` method for human-friendly measurement mode names (e.g., "Wall Time" instead of "wall_time")
30
+ * Fix DotPrinter generating self-referencing edges (was using callers instead of callees)
31
+ * Add Graphviz Online viewer link for dot output
32
+
33
+ ### Backwards Incompatible Changes
34
+ * Removed `RubyProf::MEMORY` measurement mode (no longer works on Ruby 4.0+)
35
+ * Remove compatibility API that was scheduled for removal in 2023
36
+ * Printer options now use keyword arguments instead of an options hash. For example:
37
+ ```ruby
38
+ # Before:
39
+ printer.print(STDOUT, :min_percent => 2, :sort_method => :self_time)
40
+ # After:
41
+ printer.print(STDOUT, min_percent: 2, sort_method: :self_time)
42
+ ```
43
+
44
+ ## 1.7.2 (2025-05-21)
45
+ * Fix compiling on Ubuntu and Arch Linux
46
+ * Update tests for Ruby 3.4
47
+ * Remove tests for Ruby 3.1
48
+ * Update MacOS to use clock_gettime (same as Linux) instead of proprietary mach_absolute_time API
49
+ * Add CMake support
50
+
51
+ ## 1.7.1 (2024-10-19)
52
+ * Fix crashes when calling merge due to inconsistent method keys (Chris Heald)
53
+
54
+ ## 1.7.0 (2024-01-07)
55
+ * Add support for ruby 3.3.* (Charlie Savage)
56
+ * Remove support for ruby 2.7.* (Charlie Savage)
57
+ * Fix crash caused by referencing Profile Ruby objects from Method objects that were being moved
58
+ by GC compaction (Charlie Savage)
59
+
60
+ ## 1.6.3 (2023-04-20)
61
+ * Remove debug code unintentionally left in ruby-prof command line program (Charlie Savage)
62
+
63
+ ## 1.6.2 (2023-04-17)
64
+ * Fix Profile#merge! implementation (asksurya)
65
+ * Fix ruby-prof command line program (Charlie Savage)
66
+ * Added CMakeLists.txt file (Charlie Savage)
67
+
68
+ ## 1.6.1 (2023-02-21)
69
+ * Fix loading C extension for MacOS (Charlie Savage)
70
+
71
+ ## 1.6.0 (2023-02-20)
72
+ * Add support for Ruby's compacting garbage collector (Charlie Savage)
73
+ * Add rbs signature files (Charlie Savage)
74
+ * Update rack adapter used for profiling Rails to include latest ruby-prof features (Charlie Savage)
75
+ * Add warnings for deprecated methods (Charlie Savage)
76
+ * Update tests to not use deprecated methods (Charlie Savage)
77
+ * Improve tests on OSX (Charlie Savage)
78
+
79
+ ## 1.5.0 (2023-02-06)
80
+ * Add new Profile#merge! method that merges results for threads/fibers that share the same root method (Charlie Savage)
81
+ * Expand API to allow creation of +Measurement+, +CallTree+, +MethodInfo+ and +Thread+ instances. This
82
+ was done to make is possible to write tests for the new Profile#merge! functionality (Charlie Savage)
83
+
84
+ ## 1.4.5 (2022-12-27)
85
+ * Look for ruby_prof extension built on install in the lib directory (Charlie Savage)
86
+ * Added Ruby 3.2.0 build for mingw-urct
87
+
88
+ ## 1.4.4 (2022-12-11)
89
+ * Update tests for Ruby 3.1 (Charlie Savage)
90
+ * When tracing allocations always use the RUBY_INTERNAL_EVENT_NEWOBJ trace event. Previously GC stats could also be used, but that includes the creation of internal T_IMEMO objects makes reviewing results confusing (Charlie Savage)
91
+ * Remove :profile option that lets a user set the prefix on callgrind output files since KCacheGrind will not automatically show these files in its open dialog. Fixes #313. (Charlie Savage)
92
+ * Don't expose threads to Ruby that don't have a call tree. This can happen when a user is profiling memory usage and then sends a signint to the profiled process. New objects will be created in a new thread, but no method enter/exit trace events are generated by Ruby. Thus the thread has no call tree. Fixes #312 (Charlie Savage)
93
+ * Update github Actions - change 3.0 to '3.0', add Windows mswin (MSP-Greg)
94
+ * Add Ruby 3.1 to test matrix (Charlie Savage)
95
+ * Use normal weight text instead of bold in call strack printer output. Fixes #297 (Charlie Savage)
96
+ * Update VC project to Ruby 3.1 and Visual Studio 2022 (Charlie Savage)
97
+ * Fix marshaling of profile measure. Fixes #315 (Charlie Savage)
98
+ * CI: Omit duplicate 'bundle install'. PR #309 (Olle Jonsson)
99
+ * Fix typo. s/perecent/percent/ (Paarth Madan)
100
+ * Remove support for Ruby 2.5 and 2.6 which are now end of life (Charlie Savage)
101
+
102
+ ## 1.4.3 (2021-02-16)
103
+ * Remove trailing spaces (sergioro)
104
+ * Load "ruby-prof.so" with require_relative (sergioro)
105
+ * Use same file permissions for all test files (sergioro)
106
+ * Create tmp directory for test output (sergioro)
107
+ * Update git-ignore to add mkmf log (sergioro)
108
+ * Fix minitest warning about using MT_CPU instead of N (sergioro)
109
+ * Fix minitest warning "Use assert_nil if expecting nil (sergioro)
110
+ * Add xcode project (Charlie Savage)
111
+ * Update test for Ruby 3.0 (Charlie Savage)
112
+ * Remove Ruby 2.4 support since it is no longer maintained (Charlie Savage)
113
+ * Replace travis status badge with github status badge (Charlie Savage)
114
+
115
+ ## 1.4.2 (2020-11-3)
116
+ * Do NOT use Ruby 2.7.0 and 2.7.1 with ruby-prof. A bug in those versions of ruby causes ruby-prof to
117
+ not work. Version 2.7.2 works correctly.
118
+ * Fix crash caused be reallocating an internal stack that keeps tracks of frames *after* getting a reference to the
119
+ top frame in the stack (Charlie Savage).
120
+ * Fix bug where the flat printer did not correctly report the correct measurement mode.
121
+
122
+ ## 1.4.1 (2020-05-14)
123
+ * Fix compiling on older versions of gcc that do not default to c99 (Charlie Savage)
124
+
125
+ ## 1.4.0 (2020-05-12)
126
+ * API change - remove merge_fibers support since it resulted in incorrect results or crashes (Charlie Savage)
127
+ * Fix crash when profiling memory usage (Charlie Savage)
128
+ * When tracing execution correctly print out newobj tracepoint events (Charlie Savage)
129
+ * Remove no longer needed code for building extensions (Charlie Savage)
130
+
131
+ ## 1.3.2 (2020-04-19)
132
+ * Fix rack profiler so it is thread safe (Charlie Savage)
133
+ * Fix loading of prebuilt binaries on mingw64 to use Ruby's major and minor version (Charlie Savage)
134
+
135
+ ## 1.3.1 (2020-03-11)
136
+ * Add max_percent and filter_by options to flat printer (Sean McGivern)
137
+ * Include binary in mingw64 build (Charlie Savage)
138
+
139
+ ## 1.3.0 (2020-02-22)
140
+ * Update C code to use newer RTypedData API versus older RData API.
141
+ * Update C code to use rb_cObject versus the older, deprecated, rb_cData.
142
+ * Update memory management - CallInfo's now keep alive their owning Profile instances. Fixes crashes that
143
+ could happen in rare instances.
144
+
145
+ ## 1.2.0 (2020-01-23)
146
+ * Fix call stack printer broken in version 1.0.0 (Charlie Savage)
147
+ * Ruby 2.7.0 support (Charlie Savage)
148
+ * Switch to Windows high precision timer for measuring wall time (Charlie Savage)
149
+ * Much better support for reverse call trees - if you start RubyProf at the bottom
150
+ of a call tree it will correctly calculate times as it ascends the tree (Charlie Savage)
151
+ * Port AggregateCallInfo from Ruby to C to increase performance
152
+ * API change - CallInfo has been renamed CallTree
153
+ * Fix crashes on Ruby 2.4.*
154
+
155
+ ## 1.1.0 (2019-12-14)
156
+ Changes
157
+
158
+ * Reimplement merge_fibers (Charlie Savage)
159
+ * Fix crash caused by threads being freed when profiles are freed (Charlie Savage)
160
+
161
+ ## 1.0.0 (2019-07-29)
162
+ ruby-prof's development stretches all the way back to 2005. Fourteen years later, it seems time for version 1.0!
163
+ Version 1.0 is a significant update that greatly improves the internals of ruby-prof and adds a number of improvements.
164
+
165
+ Changes (Charlie Savage):
166
+
167
+ * Profiling is significantly faster - 5x in some cases
168
+ * Recursive profiles are finally handled correctly. Yeah!!!
169
+ * Redesigned reports (Chris Whitefield)
170
+ * New documentation website (https://ruby-prof.github.io)
171
+ * The ability to measure allocations and memory usage using a standard (unpatched) version of ruby
172
+ * The ability to save and reload profiling results for later analysis
173
+ * The ability track object allocations
174
+
175
+ At the same time, it was also time to remove old code and deprecated methods. These changes include (Charlie Savage):
176
+
177
+ * Drop support for old versions of ruby. Currently 2.4 and up are required.
178
+ * Remove support for method elimination (instead use method exclusion).
179
+ * Remove the CPU_TIME measurement mode since it duplicates the PROCESS_TIME mode and required inline assembly code
180
+ * Remove the GC_TIME and GC_RUNS measurement modes since they required patched ruby versions. In modern ruby it is possible to reimplement this functionality, but it does not seem of that much value (shout out if you want it back).
181
+ * Merge the RubyProf::FlatPrinterWithLineNumbers printer into RubyProf::FlatPrinter.
182
+ * Removed support for RUBY_PROF_EDITOR_URI environment variable that specified the link scheme. This features was more confusing then helpful.
183
+
184
+
185
+ ## 0.18.0 (2019-05-27)
186
+ ### Fixes
187
+ * Fix grouping by thread/fiber (Charlie Savage)
188
+ * Fix include/exclude thread checking (Charlie Savage)
189
+ * Fix failing tests (Charlie Savage)
190
+ * Fix grouping by thread_id and fiber_id (Charlie Savage)
191
+ * Update Visual Studio solution to 2019 (Charlie Savage)
192
+ * Adjust AbstractPrinter#editor_uri so it's possible to disable uri (Maciek Dubiński)-
193
+ * Fix -X/--exclude-file option not working (John Lindgren)
194
+ * Different directory for middleware output in readme (Aldric Giacomoni)
195
+ * Fixing spelling mistakes and typos (David Kennedy and Roger Pack)
196
+ * Add "allow_exceptions" option to Profile (Ryan Duryea)
197
+ * Update readme (Jan Piotrowski, Nathan Seither, victor-am)
198
+ * Travis updates (Niocals Leger and Charlie Savage)
199
+ * Fix NewRelic module detection in exclude_common_methods! (Ben Hughes)
200
+
201
+ ## 0.17.0 (2017-12-17)
202
+ * Changed method/class names produced by the callgrind printer to be more kcachegrind
203
+ friendly (thx to Nelson Gauthier and Ben Hughes, see https://github.com/ruby-prof/ruby-prof/pull/200).
204
+ * Recursive instances of a method call are now dtected during profiling (thx to Nelson Gauthier and
205
+ Ben Hughes, see https://github.com/ruby-prof/ruby-prof/pull/201).
206
+ * Methods can now be ignored during a profiling run instead of eliminating them
207
+ after a profile run, which has been deprecated (thx to Nelson Gauthier and Ben Hughes,
208
+ see https://github.com/ruby-prof/ruby-prof/pull/202).
209
+ * Use RUBY_PROF_EDITOR_URI=emacs to open source code links in the one true editor.
210
+ (thx Alexander Egorov, see https://github.com/ruby-prof/ruby-prof/pull/183 and
211
+ https://github.com/typester/emacs-handler).
212
+ * Fixed that calling profile.stop would stop profiling all active profiling runs.
213
+ * Fixed that remembering parent call frame pointer before stack reallocation could cause a segfault.
214
+
215
+ ## 0.16.2 (2016-08-25)
216
+ * fixed incorrect setting of RUBY_VERSION macro
217
+
218
+ ## 0.16.1 (2016-08-24)
219
+ * fixed compile problem with ruby 2.1.10
220
+
221
+ ## 0.16.0 (2016-08-24)
222
+ * ruby-prof can now be installed if ruby has been compiled with --disable-gems or
223
+ RUBYOPT includes --disable-gems (thx to Arthur Nogueira Neves)
224
+ * Profile.new now accepts and prefers an options hash:
225
+ - measure_mode: one of the RubyProf measure mode constants
226
+ - exclude_threads: an array of threads to ignore when collecting profile data
227
+ - include_threads: an array of threads to include when collecting profile data
228
+ - merge_fibers: whether or not to merge the profile data for all fibers under their creating thread
229
+ * overhauled printer for cachegrind profiles:
230
+ - profile data for each thread dumped to a separate file, as kcachegrind does not
231
+ fully implement the cachegrind specification
232
+ - this required a change in interface: it's now necessary to specify a directory
233
+ where to dump the cachegrind files
234
+ - naming convention for cachegrind files changed so that kcachegrind shows them
235
+ all in the open dialog
236
+ * improved Rack middleware:
237
+ - it's now possible to use the MultiPrinter
238
+ - new option ignore_existing_threads: will ignore all prexisiting threads
239
+ when profiling a request, except the thread perfoming the request.
240
+ - new option request_thread_only: will ignore all preexisting threads, but also
241
+ all threads spwaned during the execution of the rack request.
242
+ - new option merge_fibers: whether or not to merge the profile data for all fibers under their creating thread
243
+ * fixed setting threshold bug when displaying stack profiles (thx to Michal Konarski)
244
+ * code related to printing profiles is now autoloaded for efficiency (thx to Dave Gynn)
245
+
246
+ ## 0.15.9 (2015-12-08)
247
+ * rack profiler now supports lambdas for generating profile paths (thx to Jean Rougé)
248
+ * fixed a bug when printing graph profiles
249
+
250
+ ## 0.15.8 (2015-04-24)
251
+ * added missing assets to gem build
252
+ * fixed randomly failing test
253
+
254
+ ## 0.15.7 (2015-04-23)
255
+ * html profiles are now single page (thx to Thomas Leishman)
256
+
257
+ ## 0.15.6 (2015-02-22)
258
+ * improved upon computing children time in graph printers
259
+
260
+ ## 0.15.5 (2015-02-22)
261
+ * changed output format of flat_printer_with_line_number
262
+ * support using multi printer from command line (Dov Murik)
263
+
264
+ ## 0.15.4 (2015-02-14)
265
+ * using env variable to specify mesaurement mode work again
266
+ * measuring memory/object allocations works for 2.1 adn 2.2 again
267
+
268
+ ## 0.15.3 (2015-01-16)
269
+ * support ruby 2.2.0
270
+
271
+ ## 0.15.2 (2014-05-20)
272
+ * rack middleware creates print dir for profile result (Neng)
273
+
274
+ ## 0.15.1 (2014-05-20)
275
+ * added license to gemspec
276
+
277
+ ## 0.15.0 (2014-05-02)
278
+ * improved cpu time measurement (Charlie Somerville)
279
+
280
+ ## 0.14.2 (2014-01-05)
281
+ * hopefully fixed compile problem under Windows
282
+
283
+ ## 0.14.0 (2014-01-02)
284
+ * support ruby 2.1.0
285
+ * dropped support for 1.8.x, 1.9.1 and 1.9.2
286
+
287
+ ## 0.13.1 (2013-12-14)
288
+ * speed up for displaying large call stacks (Benjamin Quoming)
289
+
290
+ ## 0.13 (2013-03-10)
291
+ * support fibers on 1.9.x+
292
+ * improved display for very wide call stacks (Sammy Larbi)
293
+
294
+ ## 0.12.2 (2013-02-13)
295
+ * Fixed segfault when using falcon or railsexpress patches for 1.9.3
296
+
297
+ ## 0.12.1 (2013-01-07)
298
+ * Add back in pause/resume support since Rails uses it
299
+
300
+ ## 0.12.0 (2013-01-06)
301
+ * Ruby 2.0.0 support (Charlie Savage)
302
+ * Fix issue where profiling results could exceed 100% if profile code had multiple top level methods (Charlie Savage)
303
+ * Replaced RubyProf::Thread#top_method with RubyProf::Thread#top_methods (Charlie Savage)
304
+ * Added RubyProf::Thread#total_time (Charlie Savage)
305
+ * Remove the -r and -e command line options. If you need specific libraries or code profiled then add them
306
+ to your code (Charlie Savage).
307
+ * Rewrite ruby-prof script to be more self-contained (Gary Weaver)
308
+ * Fix list formatting in readme (Thilo Rusche)
309
+ * Remove pause/resume support since its buggy and complicates the code
310
+
311
+ ## 0.11.3 (2012-12-27)
312
+ * Prefix c functions with prof_ to avoid name conflicts (Kenta Murata)
313
+ * Update ruby-prof script to avoid seg faults (Gary Weaver)
314
+ * Rakefile updates (Roger Pack)
315
+ * Fix regexp file reading (Gilbert Roulot)
316
+ * Update documentation (Timo Schilling)
317
+ * Fix up ruby warnings (Mike Gehard)
318
+ * Remove duplicate code (Chas Lemley)
319
+
320
+
321
+ ## 0.11.2 (2012-05-06)
322
+ * Fix compile issue with BOOL. Should be _Bool for C99.
323
+
324
+
325
+ ## 0.11.1 (2012-05-06)
326
+ * Added option --exclude-common-callbacks, plus exclude #map and #inject in common cycles (Vasily Fedoseyev)
327
+ * Add option --exclude-common-cycles to exclude common iterators (Vasily Fedoseyev)
328
+ * Allow method elimination from command line via '-x' and '-X' keys (Vasily Fedoseyev)
329
+
330
+
331
+ ## 0.11.0 (2012-05-05)
332
+ * Fix pause/resume so it actually works and add tests (David Barri)
333
+ * Resume now returns the result of the block when given (David Barri)
334
+ * Make recursive method explanation more clear (Charlie Savage)
335
+ * Fix ruby warnings (Charlie Savage)
336
+ * Toggle GC.enable_stats when profiling for memory to get the data (Vasily Fedoseyev)
337
+ * Fix patched ruby support and remove some warnings (Vasily Fedoseyev)
338
+ * Fix tests on 1.8.7 (rogerdpack)
339
+
340
+
341
+ ## 0.11.0.rc3 (2012-03-26)
342
+ * Include missing files in gemspec (Charlie Savage).
343
+
344
+
345
+ ## 0.11.0.rc2 (2012-03-25)
346
+ * Lots of improvements to Rack handler - this can be used to profile requests
347
+ in Rails and other rack-based ruby web frameworks (Charlie Savage).
348
+ * Reimplemented handling of recursive calls using CallInfoVisitor (Charlie Savage).
349
+ * Fix bug where child times were not correctly reported in complicated
350
+ call graphs with recursion like in frameworks like Rails (Charlie Savage).
351
+ * Add in recursive call information to Flat, Graph and Graph HTML reports (Charlie Savage).
352
+ * Add in new thread class add added RubyProf::Thread#top_method to
353
+ make report generation easier (Charlie Savage).
354
+ * Add in CallInfoVisitor class to make it easy to iterate over a call graph (Charlie Savage).
355
+ * Add in CallInfoPrinter to make it visualize RubyProf's internal call graphs (Charlie Savage).
356
+ * Significant updates to documentation (Charlie Savage).
357
+ * More c code cleanup (Charlie Savage).
358
+
359
+ ## 0.11.0.rc1 (2012-03-24)
360
+ * Big internal refactoring of C code to make RubyProf easier to understand and extend (Charlie Savage).
361
+ * Profile results are now returned as instances of a new class RubyProf::Profile. The old api
362
+ is supported via a compatability layer that at some point will be deprecated. (Charlie Savage).
363
+ * On Windows, use QueryPerformanceCounter and QueryPerformanceFrequency to measure CPU time instead
364
+ of rdtsc. This change is based on Microsoft's recommendation (Charlie Savage).
365
+ * On Windows use GetProcessTimes to return real PROCESS_TIME times instead of wall times (Charlie Savage).
366
+ * Split out tests for each time of measurement (cpu_time, process_time, etc.) (Charlie Savage).
367
+ * Dropped support for Ruby 1.8.4 and 1.8.6 and 1.9.0 (Charlie Savage).
368
+ * Added support for sorting results by total, self, wait and child times (Jan Suchal)
369
+ * Added tests for sorting behaviour & removed options from constructor to print method (Jan Suchal)
370
+ * Fix line number tests due to changes at top of file (Charlie Savage).
371
+ * Add encoding statement to top of all files for Ruby 1.9.x compatability (Charlie Savage).
372
+ * Add def file for VC to avoid the whole declspec annoyance (Charlie Savage).
373
+ * Update test suite to ensure current working directory is correct (Charlie Savage).
374
+ * Modernize gem file and remove various custom/home grown solutions that aren't needed anymore (Charlie Savage).
375
+ * Remove custom mingw build scripts, use rake compiler instead (Charlie Savage).
376
+ * Fixes for compiling with VC 2010 (Charlie Savage).
377
+
378
+ ## 0.10.8 (2011-07-06)
379
+ * 1.9.3 super class (Roger Pack)
380
+
381
+ ## 0.10.7 (2011-05-09)
382
+ * Fix a bug with REE's GC stats. Issue #53 [thanks graaff]
383
+
384
+ ## 0.10.6 (2011-04-29)
385
+ * Slightly more normalized url for linux/windows links to files.
386
+
387
+ ## 0.10.5 (2011-04-20)
388
+ * 1.8.6 compat for -v command (bug fix)
389
+
390
+ ## 0.10.4 (2011-04-20)
391
+ * Faster load time for ruby-prof itself.
392
+
393
+ ## 0.10.3
394
+ * Can cleanly load before rubygems now.
395
+
396
+ ## 0.10.2
397
+ * Fix for 1.9.2, os x for latest commits (thanks skaes!)
398
+
399
+ ## 0.10.1
400
+ * Fix bug in linux wall time, also load with only relative paths so that you can use it to benchmark rubygems startup overhead,
401
+ itself.
402
+
403
+ ## 0.10.0
404
+ * Some rdoc changes, for linux wall time attempt to use higher granularity (thanks to all the contributors for this round!)
405
+
406
+ ## 0.9.2
407
+ * Make graphviz work on 1.8.6
408
+ * Roll back some 1.9.2 optimizations until I can figure out what caused them.
409
+
410
+ ## 0.9.1
411
+ * Add a graphviz output
412
+
413
+ ## 0.9.0
414
+ * measurements for recursive methods are now correct
415
+ * gave up on splitting up recursive methods according to call depth
416
+ * made it possible to eliminate methods from profiling results
417
+ * new printer for call stack visualization
418
+ * new printer to print several profiles in one run
419
+ * HTML profiles contain Textmate links so you can jump to the source code easily
420
+ * producing an event log is now a runtime option
421
+
422
+ ## 0.7.10 (2009-01-22)
423
+ * fix SEGFAULT in 1.9
424
+ * add new printer flat_printer_with_line_numbers
425
+
426
+ ## 0.7.7 (2009-01-13)
427
+ * "fix" multi threading support for 1.9 http://redmine.ruby-lang.org/issues/show/2012
428
+ * speedups
429
+
430
+ ## 0.7.6 (2009-12-31)
431
+ * fix some tests for 1.9 (no real code changes)
432
+
433
+ ## 0.7.5 (2009-12)
434
+ * fix a GC collection bug (nobu's patch).
435
+ * correctly report recursive call depths (Kevin Scaldeferri).
436
+ * sort methods on output (Kevin Scaldeferri).
437
+
438
+ ## 0.7.3 (2008-12-09)
439
+ * Fixed compile error with new x86_64 code using GCC.
440
+
441
+ ## 0.7.2 (2008-12-08)
442
+ * Fixed major bug in printing child methods in graph reports.
443
+
444
+ * Fixes for supporting x86_64 machines (Diego Pettenò)
445
+
446
+
447
+ ## 0.7.1 (2008-11-28)
448
+ * Added new AggregateCallTree class for printers to
449
+ make results easier to read. Take this call sequence
450
+ for example:
451
+
452
+ A B C
453
+ | | |
454
+ Z A A
455
+ | |
456
+ Z Z
457
+
458
+ By default, ruby-prof will show that Z was called by 3 separate
459
+ instances of A. In an IDE that is helpful but in a text report
460
+ it is not since it makes the report much harder to read.
461
+ As a result, printers now aggregate together callers (and children),
462
+ matching ruby-prof's output from versions prior to 0.7.0.
463
+
464
+ * Fixes for supporting x86_64 machines (Matt Sanford)
465
+
466
+
467
+ ## 0.7.0 (2008-11-04)
468
+
469
+ ### Features
470
+ * Added two new methods - RubyProf.resume and RubyProf.pause.
471
+ RubyProf.resume takes an optional block, which ensures that
472
+ RubyProf.pause is called. For example:
473
+
474
+ 10.times do |i|
475
+ RubyProf.resume do
476
+ # Some long process
477
+ end
478
+ end
479
+
480
+ result = RubyProf.stop
481
+
482
+ * Added support for profiling tests that use Ruby's built-in
483
+ unit test framework (ie, test derived from
484
+ Test::Unit::TestCase). To enable profiling simply add
485
+ the following line of code to your test class:
486
+
487
+ include RubyProf::Test
488
+
489
+ By default, profiling results are written to the current
490
+ processes working directory. To change this, or other
491
+ profiling options, simply modify the PROFILE_OPTIONS hash
492
+ table as needed.
493
+
494
+ * Used the new support for profiling test cases to revamp
495
+ the way that Rails profiling works. For more information
496
+ please refer to RubyProf's documentation.
497
+
498
+ * Keep track of call stack for each method to enable more
499
+ powerful profile visualizations in Integrated Development
500
+ Environments (Hin Boean, work supported by CodeGear).
501
+
502
+ * Expose measurements to Ruby (Jeremy Kemper).
503
+
504
+ * Add support for additional memory measurements modes in Ruby 1.9 (Jeremy Kemper).
505
+
506
+ * Add support for Lloyd Hilaiel's Ruby patch for measuring total heap size.
507
+ See http://lloydforge.org/projects/ruby. (Jeremy Kemper).
508
+
509
+
510
+ ### Fixes
511
+ * RubyProf.profile no longer crashes if an exception is
512
+ thrown during a profiling run.
513
+
514
+ * Measure memory in fractional kilobytes rather than rounding down (Jeremy Kemper)
515
+
516
+
517
+ ## 0.6.0 (2008-02-03)
518
+
519
+ ruby-prof 0.6.0 adds support for Ruby 1.9 and memory profiling.
520
+
521
+ ### Features
522
+ * Added support for ruby 1.9 (Shugo Maeda)
523
+ * Added support for outputting printer results to a String, Array or IO
524
+ object (Michael Granger)
525
+ * Add new memory profiling mode. Note this mode depends on a
526
+ patched Ruby interpreter (Alexander Dymo)
527
+
528
+ ### Fixes
529
+ * Improvements to GraphHtmlPrinter including updated documentation,
530
+ fixes for min_time support, ability to specify templates using
531
+ strings or filenames, and table layout fixes (Makoto Kuwata)
532
+ * Fixes to scaling factor for calltrees so that precision is not lost
533
+ due to the conversion to doubles (Sylvain Joyeux)
534
+ * Changed constant ALLOCATED_OBJECTS to ALLOCATIONS in the C code to
535
+ match the Ruby code (Sylvain Joyeux)
536
+ * Added support for calltree printer to ruby-prof binary script (Sylvain Joyeux)
537
+ * Fix support for the allocator measure mode to extconf.rb (Sylvain Joyeux)
538
+ * Honor measure mode when specified on the command line (Sylvain Joyeux)
539
+ * Sorting of methods by total time was incorrect (Dan Fitch, Charlie Savage)
540
+ * Fix ruby-prof to work with the latest version of GEMS (Alexander Dymo)
541
+ * Always define MEASURE_CPU_TIME and MEASURE_ALLOCATIONS in Ruby code, but
542
+ set their values to nil if the functionality is not available.
543
+
544
+
545
+ ## 0.5.2 (2007-07-19)
546
+
547
+ ruby-prof 0.5.2 is a bug fix release.
548
+
549
+ ### Fixes
550
+ * Include missing rails plugin
551
+
552
+
553
+ ## 0.5.1 (2007-07-18)
554
+
555
+ ruby-prof 0.5.1 is a bug fix and performance release.
556
+
557
+ ### Performance
558
+ * Significantly reduced the number of thread lookups by
559
+ caching the last executed thread.
560
+
561
+ ### Fixes
562
+ * Properly escape method names in HTML reports
563
+ * Fix use of -m and --min-percent command line switches
564
+ * Default source file information to ruby_runtime#0 for c calls
565
+ * Moved rails_plugin to top level so it is more obvious
566
+ * Updated rails_plugin to write reports to the current
567
+ Rails log directory
568
+ * Added additional tests
569
+
570
+
571
+ ## 0.5.0 (2007-07-09)
572
+
573
+ ### Features
574
+ * Added support for timing multi-threaded applications
575
+ * Added support for 64 bit systems (patch from Diego 'Flameeyes' Petten)
576
+ * Added suport for outputting data in the format used by
577
+ KCacheGrind (patch from Carl Shimer)
578
+ * Add filename and line numbers to call tree information (patch from Carl Shimer)
579
+ * Added Visual Studio 2005 project file.
580
+ * Added replace-progname switch, als rcov.
581
+ * Added better support for recursive methods
582
+ * Added better support for profiling Rails applications
583
+
584
+ ### Fixes
585
+ * Fixes bug when the type of an attached object (singleton) is inherited
586
+ from T_OBJECT as opposed to being a T_OBJECT (identified by Francis Cianfrocca)
587
+ * ruby-prof now works in IRB.
588
+ * Fix sort order in reports.
589
+ * Fixed rdoc compile error.
590
+ * Fix tabs in erb template for graph html report on windows.
591
+
592
+ ## 0.4.1 (2006-06-26)
593
+
594
+ ### Features
595
+ * Added a RubyProf.running? method to indicate whether a profile is in progress.
596
+ * Added tgz and zip archives to release
597
+
598
+ ### Fixes
599
+ * Duplicate method names are now allowed
600
+ * The documentation has been updated to show the correct API usage is RubyProf.stop not RubyProf.end
601
+
602
+
603
+ ## 0.4.0 (2006-06-16)
604
+ ### Features
605
+ * added support for call graphs
606
+ * added support for printers. Currently there is a FlatPrinter,
607
+ GraphPrinter and GraphHtmlPrinter.
608
+ * added support for recursive methods
609
+ * added Windows support
610
+ * now packaged as a RubyGem
611
+
612
+ ### Fixes
613
+ * Fixes bug where RubyProf would crash depending on the
614
+ way it was invoked - for example, it did not run when
615
+ used with Arachno Ruby's customized version of Ruby.