* [ruby-core:69425] [Ruby trunk - Bug #11203] [Open] Change method entries into VALUE
[not found] <redmine.issue-11203.20150601104848@ruby-lang.org>
@ 2015-06-01 10:48 ` ko1
2015-06-01 17:17 ` [ruby-core:69433] " Eric Wong
2015-06-01 11:02 ` [ruby-core:69426] [Ruby trunk - Bug #11203] " nobu
` (2 subsequent siblings)
3 siblings, 1 reply; 5+ messages in thread
From: ko1 @ 2015-06-01 10:48 UTC (permalink / raw)
To: ruby-core
Issue #11203 has been reported by Koichi Sasada.
----------------------------------------
Bug #11203: Change method entries into VALUE
https://bugs.ruby-lang.org/issues/11203
* Author: Koichi Sasada
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v:
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
Now, rb_method_entry_t is an allocated data pointed from method tables (class/module has) and from control frame stacks.
I will change this data structure to make VALUE (T_IMEMO/ment).
And I put them onto value frames instead of control frame stacks.
This change has several advantages.
* Solve these issues.
* [Bug #11200] Memory leak of method entries
* [Bug #11046] __callee__ returns incorrect method name in orphan proc
* Simplify sweeping process of method entry
* We can remove rb_control_frame_t::me
* No need to push CREF for every method invocation. Method entries know required CREF.
* We can share per method CREF only for make them public visibility scope.
* We can introduce other optimization techniques.
* We can remove rb_control_frame_t::klass field because method entries can manipulate this information.
* We can introduce new method cache mechanism (maybe).
The following pictures show how SVAR/CREF/MENT are located at value stacks.
![before-value-stack](1.PNG)
![after-value-stack](2.PNG)
The following picture shows how alias was implemented.
![alias-relation](3.PNG)
---Files--------------------------------
1.PNG (46.6 KB)
2.PNG (43.4 KB)
3.png (31.8 KB)
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:69426] [Ruby trunk - Bug #11203] Change method entries into VALUE
[not found] <redmine.issue-11203.20150601104848@ruby-lang.org>
2015-06-01 10:48 ` [ruby-core:69425] [Ruby trunk - Bug #11203] [Open] Change method entries into VALUE ko1
@ 2015-06-01 11:02 ` nobu
2015-06-30 4:08 ` [ruby-core:69801] " usa
2015-07-02 0:14 ` [ruby-core:69834] " nagachika00
3 siblings, 0 replies; 5+ messages in thread
From: nobu @ 2015-06-01 11:02 UTC (permalink / raw)
To: ruby-core
Issue #11203 has been updated by Nobuyoshi Nakada.
Description updated
----------------------------------------
Bug #11203: Change method entries into VALUE
https://bugs.ruby-lang.org/issues/11203#change-52698
* Author: Koichi Sasada
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v:
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
Now, `rb_method_entry_t` is an allocated data pointed from method tables (`class/module` has) and from control frame stacks.
I will change this data structure to make `VALUE` (`T_IMEMO/ment`).
And I put them onto value frames instead of control frame stacks.
This change has several advantages.
* Solve these issues.
* [Bug #11200] Memory leak of method entries
* [Bug #11046] `__callee__` returns incorrect method name in orphan proc
* Simplify sweeping process of method entry
* We can remove `rb_control_frame_t::me`
* No need to push CREF for every method invocation. Method entries know required CREF.
* We can share per method CREF only for make them public visibility scope.
* We can introduce other optimization techniques.
* We can remove `rb_control_frame_t::klass` field because method entries can manipulate this information.
* We can introduce new method cache mechanism (maybe).
The following pictures show how SVAR/CREF/MENT are located at value stacks.
![before-value-stack](1.PNG)
![after-value-stack](2.PNG)
The following picture shows how alias was implemented.
![alias-relation](3.PNG)
---Files--------------------------------
1.PNG (46.6 KB)
2.PNG (43.4 KB)
3.png (31.8 KB)
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:69433] Re: [Ruby trunk - Bug #11203] [Open] Change method entries into VALUE
2015-06-01 10:48 ` [ruby-core:69425] [Ruby trunk - Bug #11203] [Open] Change method entries into VALUE ko1
@ 2015-06-01 17:17 ` Eric Wong
0 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2015-06-01 17:17 UTC (permalink / raw)
To: Ruby developers
I cannot view images at the moment, but I strongly approve of using
VALUE types more in our internals for the same reasons you describe.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:69801] [Ruby trunk - Bug #11203] Change method entries into VALUE
[not found] <redmine.issue-11203.20150601104848@ruby-lang.org>
2015-06-01 10:48 ` [ruby-core:69425] [Ruby trunk - Bug #11203] [Open] Change method entries into VALUE ko1
2015-06-01 11:02 ` [ruby-core:69426] [Ruby trunk - Bug #11203] " nobu
@ 2015-06-30 4:08 ` usa
2015-07-02 0:14 ` [ruby-core:69834] " nagachika00
3 siblings, 0 replies; 5+ messages in thread
From: usa @ 2015-06-30 4:08 UTC (permalink / raw)
To: ruby-core
Issue #11203 has been updated by Usaku NAKAMURA.
Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: WONTFIX, 2.1: WONTFIX, 2.2: UNKNOWN
----------------------------------------
Bug #11203: Change method entries into VALUE
https://bugs.ruby-lang.org/issues/11203#change-53195
* Author: Koichi Sasada
* Status: Closed
* Priority: Normal
* Assignee:
* ruby -v:
* Backport: 2.0.0: WONTFIX, 2.1: WONTFIX, 2.2: UNKNOWN
----------------------------------------
Now, `rb_method_entry_t` is an allocated data pointed from method tables (`class/module` has) and from control frame stacks.
I will change this data structure to make `VALUE` (`T_IMEMO/ment`).
And I put them onto value frames instead of control frame stacks.
This change has several advantages.
* Solve these issues.
* [Bug #11200] Memory leak of method entries
* [Bug #11046] `__callee__` returns incorrect method name in orphan proc
* Simplify sweeping process of method entry
* We can remove `rb_control_frame_t::me`
* No need to push CREF for every method invocation. Method entries know required CREF.
* We can share per method CREF only for make them public visibility scope.
* We can introduce other optimization techniques.
* We can remove `rb_control_frame_t::klass` field because method entries can manipulate this information.
* We can introduce new method cache mechanism (maybe).
The following pictures show how SVAR/CREF/MENT are located at value stacks.
![before-value-stack](1.PNG)
![after-value-stack](2.PNG)
The following picture shows how alias was implemented.
![alias-relation](3.PNG)
---Files--------------------------------
1.PNG (46.6 KB)
2.PNG (43.4 KB)
3.png (31.8 KB)
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:69834] [Ruby trunk - Bug #11203] Change method entries into VALUE
[not found] <redmine.issue-11203.20150601104848@ruby-lang.org>
` (2 preceding siblings ...)
2015-06-30 4:08 ` [ruby-core:69801] " usa
@ 2015-07-02 0:14 ` nagachika00
3 siblings, 0 replies; 5+ messages in thread
From: nagachika00 @ 2015-07-02 0:14 UTC (permalink / raw)
To: ruby-core
Issue #11203 has been updated by Tomoyuki Chikanaga.
Backport changed from 2.0.0: WONTFIX, 2.1: WONTFIX, 2.2: UNKNOWN to 2.0.0: WONTFIX, 2.1: WONTFIX, 2.2: WONTFIX
----------------------------------------
Bug #11203: Change method entries into VALUE
https://bugs.ruby-lang.org/issues/11203#change-53232
* Author: Koichi Sasada
* Status: Closed
* Priority: Normal
* Assignee:
* ruby -v:
* Backport: 2.0.0: WONTFIX, 2.1: WONTFIX, 2.2: WONTFIX
----------------------------------------
Now, `rb_method_entry_t` is an allocated data pointed from method tables (`class/module` has) and from control frame stacks.
I will change this data structure to make `VALUE` (`T_IMEMO/ment`).
And I put them onto value frames instead of control frame stacks.
This change has several advantages.
* Solve these issues.
* [Bug #11200] Memory leak of method entries
* [Bug #11046] `__callee__` returns incorrect method name in orphan proc
* Simplify sweeping process of method entry
* We can remove `rb_control_frame_t::me`
* No need to push CREF for every method invocation. Method entries know required CREF.
* We can share per method CREF only for make them public visibility scope.
* We can introduce other optimization techniques.
* We can remove `rb_control_frame_t::klass` field because method entries can manipulate this information.
* We can introduce new method cache mechanism (maybe).
The following pictures show how SVAR/CREF/MENT are located at value stacks.
![before-value-stack](1.PNG)
![after-value-stack](2.PNG)
The following picture shows how alias was implemented.
![alias-relation](3.PNG)
---Files--------------------------------
1.PNG (46.6 KB)
2.PNG (43.4 KB)
3.png (31.8 KB)
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-01 23:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <redmine.issue-11203.20150601104848@ruby-lang.org>
2015-06-01 10:48 ` [ruby-core:69425] [Ruby trunk - Bug #11203] [Open] Change method entries into VALUE ko1
2015-06-01 17:17 ` [ruby-core:69433] " Eric Wong
2015-06-01 11:02 ` [ruby-core:69426] [Ruby trunk - Bug #11203] " nobu
2015-06-30 4:08 ` [ruby-core:69801] " usa
2015-07-02 0:14 ` [ruby-core:69834] " nagachika00
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).