<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/jemalloc.git/include, branch dev</title>
<subtitle>github.com: jemalloc/jemalloc
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/jemalloc.git/'/>
<entry>
<title>Allow overriding `LG_PAGE`</title>
<updated>2023-05-17T20:55:38+00:00</updated>
<author>
<name>Kevin Svetlitski</name>
<email>svetlitski@meta.com</email>
</author>
<published>2023-05-15T17:39:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/jemalloc.git/commit/?id=4e6f1e920814eafb4ca165a861e9c886022b35e3'/>
<id>4e6f1e920814eafb4ca165a861e9c886022b35e3</id>
<content type='text'>
This is useful for our internal builds where we override the
configuration in the header files generated by autoconf.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is useful for our internal builds where we override the
configuration in the header files generated by autoconf.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove dead stores detected by static analysis</title>
<updated>2023-05-12T03:27:49+00:00</updated>
<author>
<name>Kevin Svetlitski</name>
<email>svetlitski@meta.com</email>
</author>
<published>2023-04-26T21:10:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/jemalloc.git/commit/?id=3e2ba7a6510be583edb316372f8cfff35f2f25d5'/>
<id>3e2ba7a6510be583edb316372f8cfff35f2f25d5</id>
<content type='text'>
None of these are harmful, and they are almost certainly optimized
away by the compiler. The motivation for fixing them anyway is that
we'd like to enable static analysis as part of CI, and the first step
towards that is resolving the warnings it produces at present.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
None of these are harmful, and they are almost certainly optimized
away by the compiler. The motivation for fixing them anyway is that
we'd like to enable static analysis as part of CI, and the first step
towards that is resolving the warnings it produces at present.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add config detection for JEMALLOC_HAVE_PTHREAD_SET_NAME_NP.</title>
<updated>2023-05-11T16:10:57+00:00</updated>
<author>
<name>Qi Wang</name>
<email>interwq@gwu.edu</email>
</author>
<published>2023-05-10T23:20:14+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/jemalloc.git/commit/?id=6ea8a7e928c86f7976c5e1356a22292509f8705b'/>
<id>6ea8a7e928c86f7976c5e1356a22292509f8705b</id>
<content type='text'>
and use it on the background thread name setting.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and use it on the background thread name setting.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make eligible functions `static`</title>
<updated>2023-05-08T22:00:02+00:00</updated>
<author>
<name>Kevin Svetlitski</name>
<email>svetlitski@meta.com</email>
</author>
<published>2023-05-08T19:37:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/jemalloc.git/commit/?id=70344a2d38eb71a162ea19d1a4fee8f0d168588b'/>
<id>70344a2d38eb71a162ea19d1a4fee8f0d168588b</id>
<content type='text'>
The codebase is already very disciplined in making any function which
can be `static`, but there are a few that appear to have slipped through
the cracks.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The codebase is already very disciplined in making any function which
can be `static`, but there are a few that appear to have slipped through
the cracks.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make `edata_cmp_summary_comp` 30% faster</title>
<updated>2023-05-04T16:59:17+00:00</updated>
<author>
<name>Kevin Svetlitski</name>
<email>svetlitski@meta.com</email>
</author>
<published>2023-05-01T18:49:35+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/jemalloc.git/commit/?id=6841110bd6ed17b32a5fed90c53c64555366a792'/>
<id>6841110bd6ed17b32a5fed90c53c64555366a792</id>
<content type='text'>
`edata_cmp_summary_comp` is one of the very hottest functions, taking up
3% of all time spent inside Jemalloc. I noticed that all existing
callsites rely only on the sign of the value returned by this function,
so I came up with this equivalent branchless implementation which
preserves this property. After empirical measurement, I have found that
this implementation is 30% faster, therefore representing a 1% speed-up
to the allocator as a whole.

At @interwq's suggestion, I've applied the same optimization to
`edata_esnead_comp` in case this function becomes hotter in the future.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`edata_cmp_summary_comp` is one of the very hottest functions, taking up
3% of all time spent inside Jemalloc. I noticed that all existing
callsites rely only on the sign of the value returned by this function,
so I came up with this equivalent branchless implementation which
preserves this property. After empirical measurement, I have found that
this implementation is 30% faster, therefore representing a 1% speed-up
to the allocator as a whole.

At @interwq's suggestion, I've applied the same optimization to
`edata_esnead_comp` in case this function becomes hotter in the future.
</pre>
</div>
</content>
</entry>
<entry>
<title>Some nits in cache_bin.h</title>
<updated>2023-05-01T17:21:17+00:00</updated>
<author>
<name>Amaury Séchet</name>
<email>deadalnix@gmail.com</email>
</author>
<published>2023-04-20T22:38:28+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/jemalloc.git/commit/?id=f2b28906e63bef7518c58236e3e9dde8e4fceb89'/>
<id>f2b28906e63bef7518c58236e3e9dde8e4fceb89</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove locked flag set in malloc_mutex_trylock</title>
<updated>2023-04-06T17:57:04+00:00</updated>
<author>
<name>guangli-dai</name>
<email>gdai@fb.com</email>
</author>
<published>2023-01-18T23:43:43+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/jemalloc.git/commit/?id=5f64ad60cdd2359249c863c2a01f8555672d7c35'/>
<id>5f64ad60cdd2359249c863c2a01f8555672d7c35</id>
<content type='text'>
As a hint flag of the lock, parameter locked should be set only
when the lock is gained or freed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As a hint flag of the lock, parameter locked should be set only
when the lock is gained or freed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Disallow decay during reentrancy.</title>
<updated>2023-04-05T17:16:37+00:00</updated>
<author>
<name>Qi Wang</name>
<email>interwq@gwu.edu</email>
</author>
<published>2023-03-31T02:02:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/jemalloc.git/commit/?id=434a68e221f7dbb6f30bd13d318d0c22e1b47e78'/>
<id>434a68e221f7dbb6f30bd13d318d0c22e1b47e78</id>
<content type='text'>
Decay should not be triggered during reentrant calls (may cause lock order
reversal / deadlocks).  Added a delay_trigger flag to the tickers to bypass
decay when rentrancy_level is not zero.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Decay should not be triggered during reentrant calls (may cause lock order
reversal / deadlocks).  Added a delay_trigger flag to the tickers to bypass
decay when rentrancy_level is not zero.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rearrange the bools in prof_tdata_t to save some bytes.</title>
<updated>2023-04-05T17:03:12+00:00</updated>
<author>
<name>Qi Wang</name>
<email>interwq@gwu.edu</email>
</author>
<published>2023-03-29T03:09:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/jemalloc.git/commit/?id=e62aa478c79865242363d3531fc58c4c7f65a1b4'/>
<id>e62aa478c79865242363d3531fc58c4c7f65a1b4</id>
<content type='text'>
This lowered the sizeof(prof_tdata_t) from 200 to 192 which is a round size
class.  Afterwards the tdata_t size remain unchanged with the last commit, which
effectively inlined the storage of thread names for free.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This lowered the sizeof(prof_tdata_t) from 200 to 192 which is a round size
class.  Afterwards the tdata_t size remain unchanged with the last commit, which
effectively inlined the storage of thread names for free.
</pre>
</div>
</content>
</entry>
<entry>
<title>Inline the storage for thread name in prof_tdata_t.</title>
<updated>2023-04-05T17:03:12+00:00</updated>
<author>
<name>Qi Wang</name>
<email>interwq@gwu.edu</email>
</author>
<published>2023-03-29T01:02:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/jemalloc.git/commit/?id=ce0b7ab6c8d7a3579d012c227013f5143d9bc8c6'/>
<id>ce0b7ab6c8d7a3579d012c227013f5143d9bc8c6</id>
<content type='text'>
The previous approach managed the thread name in a separate buffer, which causes
races because the thread name update (triggered by new samples) can happen at
the same time as prof dumping (which reads the thread names) -- these two
operations are under separate locks to avoid blocking each other.  Implemented
the thread name storage as part of the tdata struct, which resolves the lifetime
issue and also avoids internal alloc / dalloc during prof_sample.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous approach managed the thread name in a separate buffer, which causes
races because the thread name update (triggered by new samples) can happen at
the same time as prof dumping (which reads the thread names) -- these two
operations are under separate locks to avoid blocking each other.  Implemented
the thread name storage as part of the tdata struct, which resolves the lifetime
issue and also avoids internal alloc / dalloc during prof_sample.
</pre>
</div>
</content>
</entry>
</feed>
