summaryrefslogtreecommitdiff
path: root/ext/objspace
AgeCommit message (Collapse)Author
2014-02-05* ext/objspace/objspace_dump.c (dump_object): use STR_SHARED_P()ko1
instead of removed STR_NOCAPA_P() macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-04* string.c: remvoe STR_ASSOC related code.ko1
By r44804, string objects can not have STR_ASSOC flag. * internal.h: ditto. * ext/objspace/objspace_dump.c (dump_object): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-17* ext/objspace/object_tracing.c: Fix typo in a variable namea_matsuda
s/registerd/registered/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* ext/objspace/objspace.c (reachable_object_from_root_i): useko1
compare_by_identity hash to avoid hash modify problem during iteration. [Bug #9252] * ext/objspace/objspace.c (reachable_objects_from_root): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-15* ext/objspace/objspace.c (reachable_object_from_root_i):ko1
reachable objects should not include categories and category_objects because it is noisy information. In fact, objects created after calling ObjectSpace.reachable_objects_from_root should not be included as a returning hash objects. Currently, mswin64 platform has a problem because of this behaviour. Should we trace new objects? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10objspace_dump.c: include object's gc flags in dumptmm1
* ext/objspace/objspace_dump.c (dump_object): include fstring flag on strings. include gc flags (old, remembered, wb_protected) on all objects. * ext/objspace/objspace_dump.c (Init_objspace_dump): initialize lazy IDs before first use. * gc.c (rb_obj_gc_flags): new function to retrieve object flags * internal.h (RB_OBJ_GC_FLAGS_MAX): maximum flags allowed for one obj * test/objspace/test_objspace.rb (test_dump_flags): test for above * test/objspace/test_objspace.rb (test_trace_object_allocations): resolve name before dump (for rb_class_path_cached) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-09object_tracing.c: fix allocation from NEWOBJ hooknobu
* ext/objspace/object_tracing.c (newobj_i): use cached class path only to get rid object allocation during NEWOBJ hook. [ruby-core:58853] [Bug #9212] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05ext/objspace: remove OS.after_gc_start_hook= and move internal testtmm1
* ext/objspace/gc_hook.c: remove this file * ext/-test-/tracepoint/gc_hook.c: new filename for above * ext/objspace/objspace.c: remove ObjectSpace.after_gc_start_hook= * test/objspace/test_objspace.rb: remove test * test/-ext-/tracepoint/test_tracepoint.rb: add above test for tracepoint re-entry git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05gc.c: split GC_END event into GC_END_MARK and GC_END_SWEEPtmm1
* include/ruby/ruby.h: remove INTERNAL_EVENT_GC_END and replace with two new events: GC_END_MARK and GC_END_SWEEP * gc.c (gc_after_sweep): emit GC_END_SWEEP after lazy sweep is done * gc.c (gc_marks_body): emit GC_END_MARK at end of minor/major mark * ext/-test-/tracepoint/tracepoint.c (struct tracepoint_track): tests for new events. * test/-ext-/tracepoint/test_tracepoint.rb (class TestTracepointObj): ditto. * NEWS: remove ObjectSpace.after_gc_*_hook. These are only a sample, and will be removed before ruby 2.1. * ext/objspace/gc_hook.c: remove ObjectSpace.after_gc_end_hook= git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26* ext/objspace/object_tracing.c (newobj_i): skip class_path if classko1
is frozen. rb_class_path() can modify frozen classes (and causes errors). This patch is temporary. We need no-modification/no-allocation class path function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26* ext/objspace/objspace_dump.c (dump_append_string_value): Escapetmm1
control characters for strict json parsers. * ext/objspace/objspace_dump.c (objspace_dump): Document File/IO output option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-25* NEWS: Add ObjectSpace.after_gc_{start,end}_hook=tmm1
* ext/objspace/objspace_dump.c: [DOC] catch up dump/dump_all to r43679 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-24* ext/objspace/objspace_dump.c: test fixes and win32 compatibilitytmm1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-14objspace_dump.c: refine outputnobu
* ext/objspace/objspace_dump.c (dump_output): allow IO object as output, and use Tempfile.create and return open file instead of mkstemp() and path name for :file output. [ruby-core:58266] [Bug #9102] * test/objspace/test_objspace.rb (TestObjSpace#dump_my_heap_please): remove temporary output file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-11* internal.h: move common string/hash flags to include file.tmm1
* ext/objspace/objspace_dump.c: remove flags shared above. * hash.c: ditto. * string.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09objspace_dump.c: fix declarationnobu
* ext/objspace/objspace_dump.c (dump_output): fix declaration, mkstemp() needs a writable buffer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09* ext/objspace/object_tracing.c: use declarations in internal.h.nari
* ext/objspace/objspace.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09objspace_dump.c: fix portability issuenobu
* ext/objspace/objspace_dump.c (dump_output): fix portability issue. mkstemp() may not be available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09objspace_dump.c: extract output option utilitiesnobu
* ext/objspace/objspace_dump.c (dump_output, dump_result): extract output option utility functions from objspace_dump() and objspace_dump_all(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09objspace_dump.c: suppress warningsnobu
* ext/objspace/objspace_dump.c (dump_object): remove unused variables, and cast size_t to long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09objspace_dump.c: indentnobu
* ext/objspace/objspace_dump.c: adjust indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-08* ext/objspace/object_tracing.c: Add experimental methods to dumptmm1
objectspace as json: ObjectSpace.dump_all and ObjectSpace.dump(obj). These methods are useful for debugging reference leaks and memory growth in large ruby applications. [Bug #9026] [ruby-core:57893] [Fixes GH-423] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-07* ext/objspace/object_tracing.c: [DOC] trace_object_allocations_stopzzak
By @srawlins [Fixes GH-421] https://github.com/ruby/ruby/pull/421 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05* gc.c: add support to estimate increase of oldspace memory usage.ko1
This is another approach to solve an issue discussed at r43530. This feature is diabled as default. This feature measures an increment of memory consuption by oldgen objects. It measures memory consumption for each objects when the object is promoted. However, measurement of memory consumption is not accurate now. So that this measurement is `estimation'. To implement this feature, move memsize_of() function from ext/objspace/objspace.c and expose rb_obj_memsize_of(). Some memsize() functions for T_DATA (T_TYPEDDATA) have problem to measure memory size, so that we ignores T_DATA objects now. For example, some functions skip NULL check for pointer. The macro RGENGC_ESTIMATE_OLDSPACE enables/disables this feature, and turned off as default. We need to compare 3gen GC and this feature carefully. (it is possible to enable both feature) We need a help to compare them. * internal.h: expose rb_obj_memsize_of(). * ext/objspace/objspace.c: use rb_obj_memsize_of() function. * cont.c (fiber_memsize): fix to check NULL. * variable.c (autoload_memsize): ditto. * vm.c (vm_memsize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29* add RUBY_TYPED_FREE_IMMEDIATELY to data types which only useko1
safe functions during garbage collection such as xfree(). On default, T_DATA objects are freed at same points as fianlizers. This approach protects issues such as reported by [ruby-dev:35578]. However, freeing T_DATA objects immediately helps heap usage. Most of T_DATA (in other words, most of dfree functions) are safe. However, we turned off RUBY_TYPED_FREE_IMMEDIATELY by default for safety. * cont.c: ditto. * dir.c: ditto. * encoding.c: ditto. * enumerator.c: ditto. * error.c: ditto. * file.c: ditto. * gc.c: ditto. * io.c: ditto. * iseq.c: ditto. * marshal.c: ditto. * parse.y: ditto. * proc.c: ditto. * process.c: ditto. * random.c: ditto. * thread.c: ditto. * time.c: ditto. * transcode.c: ditto. * variable.c: ditto. * vm.c: ditto. * vm_backtrace.c: ditto. * vm_trace.c: ditto. * ext/bigdecimal/bigdecimal.c: ditto. * ext/objspace/objspace.c: ditto. * ext/stringio/stringio.c: ditto. * ext/strscan/strscan.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28* common.mk, ext/objspace/depend, ext/coverage/depend,akr
ext/-test-/debug/depend, ext/date/depend: Update dependencies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-17* ext/objspace/object_tracing.c (newobj_i): fix memory leak.ko1
There is possibility to remain info due to missing FREEOBJ event. FREEOBJ events are skipped while suppress_tracing state, for example, during trace events are invoking. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-16* ext/objspace/object_tracing.c (newobj_i): add workaround.ko1
some bugs hits this check. * ext/objspace/object_tracing.c (object_allocations_reporter_i): cast as pointer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-16* ext/objspace/object_tracing.c: add new methodko1
ObjectSpace.trace_object_allocations_debug_start for GC debugging. If you encounter the BUG "... is T_NONE" (and so on) on your application, please try this method at the beggining of your app. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-16* ext/objspace/objspace.c: add a new method `reachable_objects_from_root'.ko1
ObjectSpace.reachable_objects_from_root returns all objects refered from root (called "root objects"). This feature is for deep object analysis. * test/objspace/test_objspace.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-11* ext/objspace/gc_hook.c: prohibit reentrant.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-30* ext/objspace/objspace.c: [DOC] Cleaned up many rdoc formattingzzak
issues and several duplicate grammar bugs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-30* ext/objspace/object_tracing.c: [DOC] Adjust rdoc formatting and fixzzak
small grammar typo git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-30* ext/objspace/object_tracing.c: [DOC] add some nots forko1
ObjectSpace::trace_object_allocations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-30* ext/objspace/object_tracing.c: add new 3 methods to control tracing.ko1
* ObjectSpace::trace_object_allocations_start * ObjectSpace::trace_object_allocations_stop * ObjectSpace::trace_object_allocations_clear And some refactoring. * test/objspace/test_objspace.rb: add a test for new methods. * NEWS: add a description for new methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18* ext/objspace/object_tracing.c: Return for ::allocation_generationzzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18* ext/objspace/object_tracing.c: Document object_tracing methods.zzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18* ext/objspace/objspace.c: Document ObjectSpace::InternalObjectWrapper.zzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18* ext/objspace/object_tracing.c: Teach rdoc object_tracing.c [Bug #8537]zzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18* ext/objspace/objspace.c: rdoc on require to overview from r41355zzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17* ext/objspace/objspace.c: let rdoc know about objspace methods.eregon
Specify 'objspace' should be required. See #8537. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17* gc.c (ObjectSpace): is a module not a class.eregon
* ext/objspace/objspace.c: try to include overview in rdoc, see #8537. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-06* ext/objspace/object_tracing.c: rename allocation_info tonari
lookup_allocation_info. At times I confused "struct allocation_info" with "function allocation_info". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-06* ext/objspace/object_tracing.c: allocation_info function isn'tnari
called by any other file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-04* ext/objspace/objspace.c: improve wording and remove duplicated comment.eregon
Based on a patch by Dave Goodchild. [Fixes GH-299] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-28fix typotmm1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-28object_tracing.c: fix argument typenobu
* ext/objspace/object_tracing.c (make_unique_str): fix argument type. use long for string length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-28* ext/objspace/object_tracing.c: fix a bug reported atko1
"[ruby-core:55182] [ruby-trunk - Bug #8456][Open] Sugfault in Ruby Head" Care about the case TracePoint#path #=> `nil'. * ext/objspace/object_tracing.c: add two new methods: * ObjectSpace.allocation_class_path(o) * ObjectSpace.allocation_method_id(o) They are not useful for Object.new because they are always "Class" and :new. To trace more useful information, we need to maintain call-tree using call/return hooks, which is implemented by ll-prof <http://sunagae.net/wiki/doku.php?id=software:llprof> * test/objspace/test_objspace.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-28ext/objspace: unexpand Author keywordsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-27* properties.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e