<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext/objspace/objspace_dump.c, branch v3_0_4</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>merge revision(s) 6ca3d1af3302f722aed530764d07c1cc83e95ecf: [Backport #17552]</title>
<updated>2021-02-02T06:47:50+00:00</updated>
<author>
<name>NARUSE, Yui</name>
<email>naruse@airemix.jp</email>
</author>
<published>2021-02-01T15:15:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c09f5ee344ae5e6edb827b177bc6a5c2df37e805'/>
<id>c09f5ee344ae5e6edb827b177bc6a5c2df37e805</id>
<content type='text'>
	objspace_dump.c: Handle allocation path and line missing

	---
	 ext/objspace/objspace_dump.c | 13 +++++++++----
	 1 file changed, 9 insertions(+), 4 deletions(-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	objspace_dump.c: Handle allocation path and line missing

	---
	 ext/objspace/objspace_dump.c | 13 +++++++++----
	 1 file changed, 9 insertions(+), 4 deletions(-)
</pre>
</div>
</content>
</entry>
<entry>
<title>Make ext/objspace ASAN friendly</title>
<updated>2020-09-28T15:20:23+00:00</updated>
<author>
<name>Aaron Patterson</name>
<email>tenderlove@ruby-lang.org</email>
</author>
<published>2020-09-25T21:50:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=18b3f0f54c66632b1039a27634a8a449a7812e34'/>
<id>18b3f0f54c66632b1039a27634a8a449a7812e34</id>
<content type='text'>
ext/objspace iterates over the heap, but some slots in the heap are
poisoned, so we need to take care of that when running with ASAN
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ext/objspace iterates over the heap, but some slots in the heap are
poisoned, so we need to take care of that when running with ASAN
</pre>
</div>
</content>
</entry>
<entry>
<title>Parse ObjectSpace.dump_all / dump arguments in Ruby to avoid allocation noise</title>
<updated>2020-09-15T16:18:13+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2020-09-10T11:17:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fbba6bd4e3dff7a61965208fecae908f10c4edbe'/>
<id>fbba6bd4e3dff7a61965208fecae908f10c4edbe</id>
<content type='text'>
[Feature #17045] ObjectSpace.dump_all should allocate as little as possible in the GC heap

Up until this commit ObjectSpace.dump_all allocates two Hash because of `rb_scan_args`.

It also can allocate a `File` because of `rb_io_get_write_io`.

These allocations are problematic because `dump_all` dumps the Ruby
heap, so it should try modify as little as possible what it is
observing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Feature #17045] ObjectSpace.dump_all should allocate as little as possible in the GC heap

Up until this commit ObjectSpace.dump_all allocates two Hash because of `rb_scan_args`.

It also can allocate a `File` because of `rb_io_get_write_io`.

These allocations are problematic because `dump_all` dumps the Ruby
heap, so it should try modify as little as possible what it is
observing.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add missing break</title>
<updated>2020-09-11T02:02:24+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2020-09-11T02:01:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=406559a268c0968be5497e6bc0513aa6fe7b0373'/>
<id>406559a268c0968be5497e6bc0513aa6fe7b0373</id>
<content type='text'>
pointed out by Coverity Scan
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pointed out by Coverity Scan
</pre>
</div>
</content>
</entry>
<entry>
<title>Optimize ObjectSpace.dump_all</title>
<updated>2020-09-09T18:11:36+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2020-08-18T07:41:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5001cc47169614ea07d87651c95c2ee185e374e0'/>
<id>5001cc47169614ea07d87651c95c2ee185e374e0</id>
<content type='text'>
The two main optimization are:
  - buffer writes for improved performance
  - avoid formatting functions when possible

```

|                   |compare-ruby|built-ruby|
|:------------------|-----------:|---------:|
|dump_all_string    |       1.038|   195.925|
|                   |           -|   188.77x|
|dump_all_file      |      33.453|   139.645|
|                   |           -|     4.17x|
|dump_all_dev_null  |      44.030|   278.552|
|                   |           -|     6.33x|
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The two main optimization are:
  - buffer writes for improved performance
  - avoid formatting functions when possible

```

|                   |compare-ruby|built-ruby|
|:------------------|-----------:|---------:|
|dump_all_string    |       1.038|   195.925|
|                   |           -|   188.77x|
|dump_all_file      |      33.453|   139.645|
|                   |           -|     4.17x|
|dump_all_dev_null  |      44.030|   278.552|
|                   |           -|     6.33x|
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a :since option to dump_all</title>
<updated>2020-09-09T15:05:14+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2020-07-28T10:58:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b49a8704143ce47de0472b6033fc5797aed21f52'/>
<id>b49a8704143ce47de0472b6033fc5797aed21f52</id>
<content type='text'>
This is useful to see what a block of code allocated, e.g.

```
GC.start
GC.disable
ObjectSpace.trace_object_allocations do
  # run some code
end
gc_gen = GC.count
allocations = ObjectSpace.dump_all(output: :file, since: gc_gen)
GC.enable
GC.start
retentions = ObjectSpace.dump_all(output: :file, since: gc_gen)
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is useful to see what a block of code allocated, e.g.

```
GC.start
GC.disable
ObjectSpace.trace_object_allocations do
  # run some code
end
gc_gen = GC.count
allocations = ObjectSpace.dump_all(output: :file, since: gc_gen)
GC.enable
GC.start
retentions = ObjectSpace.dump_all(output: :file, since: gc_gen)
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix method name escaping in ObjectSpace.dump</title>
<updated>2020-08-17T16:47:53+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2020-07-09T21:59:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=971857c3326b163c45f02922bb5c5143d54e520d'/>
<id>971857c3326b163c45f02922bb5c5143d54e520d</id>
<content type='text'>
It's possible to define methods with any name, even if the parser
doesn't support it and it can only be used with ex. send.

This fixes an issue where invalid JSON was output from ObjectSpace.dump
when a method name needed escaping.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's possible to define methods with any name, even if the parser
doesn't support it and it can only be used with ex. send.

This fixes an issue where invalid JSON was output from ObjectSpace.dump
when a method name needed escaping.
</pre>
</div>
</content>
</entry>
<entry>
<title>Also escape DEL code</title>
<updated>2020-08-17T13:36:48+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2020-08-17T13:36:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=27f7b047e07ceb9ee963e5d74ab0399b5e94ac4c'/>
<id>27f7b047e07ceb9ee963e5d74ab0399b5e94ac4c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed the radix for control chars</title>
<updated>2020-08-17T13:30:26+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2020-08-17T13:29:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7b4b5e08409f1df2a99c00d40f4859b584cd1dd6'/>
<id>7b4b5e08409f1df2a99c00d40f4859b584cd1dd6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid allocating a string when dumping an anonymous module or class</title>
<updated>2020-07-23T01:52:30+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2020-07-22T10:47:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6a0cb1d649ecfc3e2af922c74ce82b3ff95fb12a'/>
<id>6a0cb1d649ecfc3e2af922c74ce82b3ff95fb12a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
