summaryrefslogtreecommitdiff
path: root/ext/objspace
AgeCommit message (Collapse)Author
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
2013-05-27* ext/objspace/gc_hook.c, ext/objspace/objspace.c: add new methods toko1
hook GC invocation. * ObjectSpace.after_gc_start_hook=(proc) * ObjectSpace.after_gc_end_hook=(proc) Note that hooks are not kicked immediately. Procs are kicked at postponed_job. This feature is a sample of new internal event and rb_postponed_job API. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-27suppress warningsnobu
* ext/-test-/postponed_job/postponed_job.c (pjob_register), (pjob_call_direct): none void function. * ext/-test-/tracepoint/tracepoint.c (tracepoint_track_objspace_events): adjust type to get rid of implicit cast. * ext/objspace/object_tracing.c (newobj_i): ditto. * ext/tk/tkutil/tkutil.c (tk_conv_args): adjust type against RHASH_SIZE(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-27* include/ruby/ruby.h: rename RUBY_INTERNAL_EVENT_FREE toko1
RUBY_INTERNAL_EVENT_FREEOBJ. * ext/-test-/tracepoint/tracepoint.c, ext/objspace/object_tracing.c, gc.c, vm_trace.c: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-27* ext/objspace/objspace.c: support ObjectSpace.trace_object_allocations.ko1
Read the following test to know HOWTO. This feature is a sample of RUBY_INTERNAL_EVENT. * test/objspace/test_objspace.rb: add a test. * ext/objspace/object_tracing.c: ditto. * gc.c (rb_gc_count): add. THis function returns GC count. * internal.h: add decl. of rb_gc_count(). Same as `GC.count'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-13* lib/mkmf.rb: Add ruby/ruby.h, ruby/missing.h, ruby/intern.h,akr
ruby/st.h and ruby/subst.h for ruby_headers in generated Makefile. * ext/-test-/old_thread_select/depend: Update dependencies. * ext/-test-/wait_for_single_fd/depend: Ditto. * ext/bigdecimal/depend: Ditto. * ext/curses/depend: Ditto. * ext/digest/bubblebabble/depend: Ditto. * ext/digest/depend: Ditto. * ext/digest/md5/depend: Ditto. * ext/digest/rmd160/depend: Ditto. * ext/digest/sha1/depend: Ditto. * ext/digest/sha2/depend: Ditto. * ext/dl/callback/depend: Ditto. * ext/dl/depend: Ditto. * ext/etc/depend: Ditto. * ext/nkf/depend: Ditto. * ext/objspace/depend: Ditto. * ext/pty/depend: Ditto. * ext/readline/depend: Ditto. * ext/ripper/depend: Ditto. * ext/sdbm/depend: Ditto. * ext/socket/depend: Ditto. * ext/stringio/depend: Ditto. * ext/strscan/depend: Ditto. * ext/syslog/depend: Ditto. * ext/-test-/num2int/depend: Removed. * ext/dbm/depend: Ditto. * ext/fcntl/depend: Ditto. * ext/gdbm/depend: Ditto. * ext/racc/cparse/depend: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-19* ext/objspace/objspace.c: Fix typo in doc. Patch by Sho Hashimoto.sorah
[Bug #8116] [ruby-dev:47177] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05objspace.c: newly added nodesnobu
* ext/objspace/objspace.c (count_nodes): count also newly added nodes, and fix key for unknown node. patch by tmm1 (Aman Gupta) in [ruby-core:53130] [Bug #8014] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-26fix typosnari
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-08* ext/objspace/objspace.c (iow_size): return size of internal objectko1
for ObjectSpace.memsize_of(). * test/objspace/test_objspace.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-24objspace.c: enum ruby_value_typenobu
* ext/objspace/objspace.c (type2sym, count_objects_size): use enum instead of size_t which may be larger than actual values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-24* ext/objspace/objspace.c (reachable_object_from_i): change datako1
structure of the result of reachable objects. Keys of table contains object_id of each reachable objects. Value of table is an object itself or an instance of InternalObjectWrapper. To avoid duplication, we use st_table and object_id keys. * ext/objspace/objspace.c (type2sym): bug fix. Should use `i' instead of `type'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-24* ext/objspace/objspace.c (Init_objspace): add a new methodko1
`ObjectSpace::InternalObjectWrapper#internal_object_id' which returns an object id of a wrapped internal object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-24* ext/objspace/objspace.c (ObjectSpace.reachable_objects_from):ko1
internal object support. If given object `obj' has references to internal objects (such as T_NODE objects), then this method returns instances of `ObjectSpace::InternalObjectWrapper' instead of that internal objects. This instance contains a refereance to an internal object and you can check the type of internal object using `ObjectSpace::InternalObjectWrapper#type' method. Rdoc of `InternalObjectWrapper' is not prepared yet. * gc.c (rb_objspace_reachable_objects_from), gc.h: change an interface of 'rb_objspace_reachable_objects_from()' * gc.c, gc.h: add two APIs - rb_objspace_markable_object_p(obj): check markable or not. - rb_objspace_internal_object_p(obj): check internal or not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05* ext/objspace/objspace.c: add ObjectSpace#reachable_objects_from.ko1
This method returns an array of objects referenced by given object. If given object is special objects such as true/false/nil/Fixnum etc then it returns nil. See rdoc for details. [ruby-core:39772] * test/objspace/test_objspace.rb: add a test for this method. * gc.c: add rb_objspace_reachable_objects_from(). To make this function, add several member `mark_func_data' to rb_objspace_t. If mark_func_data is not null, then gc_mark() calls mark_func_data::mark_func. * gc.h: export rb_objspace_reachable_objects_from(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28* insns.def (opt_checkenv): remove unused instruction `opt_checkenv'.ko1
* compile.c (iseq_compile_each): ditto. * node.h: remove unused node `NODE_OPTBLOCK'. * ext/objspace/objspace.c, gc.c (gc_mark_children): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-27fix null m_tblnobu
* ext/objspace/objspace.c (memsize_of): m_tbl in prepended class/module is NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-23use RB_TYPE_P() instead of comparison of TYPE()nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-15* regcomp.c (onig_region_memsize): implemented for memsize_of().nobu
* ext/objspace/objspace.c (memsize_of): use it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-07* ext/objspace/objspace.c: fix typos in a document.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-30* ext/objspace/objspace.c (ObjectSpace.count_tdata_objects):ko1
Fix rdoc. * ext/objspace/objspace.c (ObjectSpace.count_tdata_objects): Change key type if the klass of a object is zero (internal object). Read rdoc for details. * internal.h: export rb_objspace_data_type_name(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-12* ext/objspace/objspace.c (total_i): fix to skip no ruby objects.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-18* internal.h: add for internal use only.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-29* ext/objspace/objspace.c (memsize_of): take care ofko1
T_CLASS/const_tbl. a patch from nagachika <nagachika00@gmail.com> [ruby-dev:42490] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-28* ext/objspace/objspace.c (ObjectSpace.memsize_of_all): renameko1
ObjectSpace.total_memsize_of_all_objects() to ObjectSpace.memsize_of_all([klass]). Accept Class object to filter the objects. * test/objspace/test_objspace.rb: fix test for above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-27* ext/objspace/objspace.c (memsize_of): fix rdoc.ko1
* ext/objspace/objspace.c (total_memsize_of_all_objects): added. * test/objspace/test_objspace.rb: - add a test for ObjectSpace.total_memsize_of_all_objects. - add two tests for ObjectSpace.memsize_of (for nil and Fixnum). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* ext/{coverage,objspace}/extconf.rb ($INCFLAGS): explicitly addnobu
topdir and top_srcdir. [ruby-dev:42031] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* test/objspace/test_objspace.rb: added test for objspace.nari
* ext/objspace/objspace.c: considers T_ZOMBIE by lazy sweep GC. * gc.c: considers that dsize was 0. [ruby-dev:42022] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* io.c (rb_io_memsize): constified.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* regcomp.c (onig_memsize): constified.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* gc.h (rb_objspace_each_objects): used in objspace.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22* ext/**/*.[ch]: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09Wed Sep 9 15:24:32 2009 TAKANO Mitsuhiro (takano32) <tak@no32.tk>takano32
* include/ruby/st.h : revert previous commit. * ext/objspace/objspace.c : remove st_memsize declare. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-15* method.h, vm_core.h: add rb_method_entry_t. Remove nodes aroundko1
method management. This change affect some VM control stack structure. * vm.c, vm_insnhelper.c, vm_method.c, vm_eval.c: ditto. and make some refactoring. * insns.def, class.c, eval.c, proc.c, vm_dump.c : ditto. * vm_core.h, compile.c (iseq_specialized_instruction): remove VM_CALL_SEND_BIT. use another optimization tech for Kernel#send. * node.h: remove unused node types. * ext/objspace/objspace.c (count_nodes): ditto. * gc.c: add mark/free functions for method entry. * include/ruby/intern.h: remove decl of rb_define_notimplement_method_id(). nobody can use it because noex is not opend. * iseq.c (iseq_mark): fix to check ic_method is available. * iseq.c (rb_iseq_disasm): fix to use rb_method_get_iseq(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-22* variable.c (rb_generic_ivar_memsize): typo fixed. a patch frommatz
Kazuhiro NISHIYAMA. [ruby-dev:38700] * ext/objspace/objspace.c (memsize_of): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-16* ext/objspace: added. objspace library extends some methods toko1
ObjectSpace module. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e