* [ruby-core:71164] [Ruby trunk - Feature #11614] [Open] [RFC] use id_table for constant tables
[not found] <redmine.issue-11614.20151022205443@ruby-lang.org>
@ 2015-10-22 20:54 ` normalperson
2015-12-14 11:19 ` [ruby-core:72112] " Eric Wong
0 siblings, 1 reply; 3+ messages in thread
From: normalperson @ 2015-10-22 20:54 UTC (permalink / raw)
To: ruby-core
Issue #11614 has been reported by Eric Wong.
----------------------------------------
Feature #11614: [RFC] use id_table for constant tables
https://bugs.ruby-lang.org/issues/11614
* Author: Eric Wong
* Status: Open
* Priority: Normal
* Assignee:
----------------------------------------
ref: [ruby-core:71142] [ruby-core:71151]
I'm not sure if using rb_class_name in object.c is enough to prevent
breaking all existing code. Until this is sufficiently reviewed,
I have no plans to commit this patch at the moment.
valgrind 3.9.0 on x86-64 reports a minor reduction in memory usage
when loading only RubyGems and RDoc by running: ruby -rrdoc -eexit
before: HEAP SUMMARY:
in use at exit: 2,913,448 bytes in 27,394 blocks
total heap usage: 48,362 allocs, 20,968 frees, 9,034,621 bytes alloc
after: HEAP SUMMARY:
in use at exit: 2,880,056 bytes in 26,712 blocks
total heap usage: 47,791 allocs, 21,079 frees, 9,046,507 bytes alloc
* class.c (struct clone_const_arg): adjust for id_table
(clone_const): ditto
(clone_const_i): ditto
(rb_mod_init_copy): ditto
(rb_singleton_class_clone_and_attach): ditto
(rb_include_class_new): ditto
(include_modules_at): ditto
* constant.h (rb_free_const_table): ditto
* gc.c (free_const_entry_i): ditto
(rb_free_const_table): ditto
(obj_memsize_of): ditto
(mark_const_entry_i): ditto
(mark_const_tbl): ditto
* internal.h (struct rb_classext_struct): ditto
* object.c (rb_mod_const_set): resolve class name on assignment
* variable.c (const_update): replace with const_tbl_update
(const_tbl_update): new function
(fc_i): adjust for id_table
(find_class_path): ditto
(autoload_const_set): st_update => const_tbl_update
(rb_const_remove): adjust for id_table
(sv_i): ditto
(rb_local_constants_i): ditto
(rb_local_constants): ditto
(rb_mod_const_at): ditto
(rb_mod_const_set): ditto
(rb_const_lookup): ditto
---Files--------------------------------
0001-use-id_table-for-constant-tables.patch (18.3 KB)
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:72112] Re: [Ruby trunk - Feature #11614] [Open] [RFC] use id_table for constant tables
2015-10-22 20:54 ` [ruby-core:71164] [Ruby trunk - Feature #11614] [Open] [RFC] use id_table for constant tables normalperson
@ 2015-12-14 11:19 ` Eric Wong
2015-12-26 7:37 ` [ruby-core:72484] " Eric Wong
0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2015-12-14 11:19 UTC (permalink / raw)
To: ruby-core
normalperson@yhbt.net wrote:
> Feature #11614: [RFC] use id_table for constant tables
> https://bugs.ruby-lang.org/issues/11614
Any comment? I'm pretty sure this was alright,
but maybe it's 2.4 material. Thanks.
Also related: [ruby-core:71455]
<http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/71455>
<http://80x24.org/spew/20151111201126.22805-1-e%4080x24.org/raw>
for iv_index_tbl, but that's more likely for 2.4.
ID_TABLE_USE_ID_SERIAL limits the flexibility of id_table greatly :/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:72484] Re: [Ruby trunk - Feature #11614] [Open] [RFC] use id_table for constant tables
2015-12-14 11:19 ` [ruby-core:72112] " Eric Wong
@ 2015-12-26 7:37 ` Eric Wong
0 siblings, 0 replies; 3+ messages in thread
From: Eric Wong @ 2015-12-26 7:37 UTC (permalink / raw)
To: ruby-core
Eric Wong <normalperson@yhbt.net> wrote:
> normalperson@yhbt.net wrote:
> > Feature #11614: [RFC] use id_table for constant tables
> > https://bugs.ruby-lang.org/issues/11614
>
> Any comment? I'm pretty sure this was alright,
> but maybe it's 2.4 material. Thanks.
Updated patch on top of latest trunk r53315
http://80x24.org/spew/20151226073256.24943-1-e%4080x24.org/raw
I think I'll commit in a few days since we have a year until 2.4
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-12-26 7:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <redmine.issue-11614.20151022205443@ruby-lang.org>
2015-10-22 20:54 ` [ruby-core:71164] [Ruby trunk - Feature #11614] [Open] [RFC] use id_table for constant tables normalperson
2015-12-14 11:19 ` [ruby-core:72112] " Eric Wong
2015-12-26 7:37 ` [ruby-core:72484] " Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).