<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/test/API/python_api/global_module_cache/two-print.c, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>Reland "Add a test for evicting unreachable modules from the global module cache (#74894)"</title>
<updated>2023-12-14T10:54:03+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2023-12-14T10:15:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d0f5039e5db5c2b9222f78e7242401061ab259dc'/>
<id>d0f5039e5db5c2b9222f78e7242401061ab259dc</id>
<content type='text'>
This reverts commit 35dacf2f51af251a74ac98ed29e7c454a619fcf1.

And relands the original change with two additions so I can debug the failure on Arm/AArch64:
* Enable lldb step logging in the tests.
* Assert that the current plan is not the base plan at the spot I believe is calling PopPlan.

These will be removed and replaced with a proper fix once I see some failures on the bots,
I couldn't reproduce it locally.

(also, no sign of it on the x86_64 bot)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 35dacf2f51af251a74ac98ed29e7c454a619fcf1.

And relands the original change with two additions so I can debug the failure on Arm/AArch64:
* Enable lldb step logging in the tests.
* Assert that the current plan is not the base plan at the spot I believe is calling PopPlan.

These will be removed and replaced with a proper fix once I see some failures on the bots,
I couldn't reproduce it locally.

(also, no sign of it on the x86_64 bot)
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Add a test for evicting unreachable modules from the global module cache (#74894)"</title>
<updated>2023-12-13T11:34:43+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2023-12-13T11:34:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=35dacf2f51af251a74ac98ed29e7c454a619fcf1'/>
<id>35dacf2f51af251a74ac98ed29e7c454a619fcf1</id>
<content type='text'>
This reverts commit 2684281d208612a746b05c891f346bd7b95318d5.

Due to being flaky on Arm and AArch64 buildbots.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 2684281d208612a746b05c891f346bd7b95318d5.

Due to being flaky on Arm and AArch64 buildbots.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a test for evicting unreachable modules from the global module cache (#74894)</title>
<updated>2023-12-12T19:28:06+00:00</updated>
<author>
<name>jimingham</name>
<email>jingham@apple.com</email>
</author>
<published>2023-12-12T19:28:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2684281d208612a746b05c891f346bd7b95318d5'/>
<id>2684281d208612a746b05c891f346bd7b95318d5</id>
<content type='text'>
When you debug a binary and the change &amp; rebuild and then rerun in lldb
w/o quitting lldb, the Modules in the Global Module Cache for the old
binary &amp; .o files if used are now "unreachable". Nothing in lldb is
holding them alive, and they've already been unlinked. lldb will
properly discard them if there's not another Target referencing them.

However, this only works in simple cases at present. If you have several
Targets that reference the same modules, it's pretty easy to end up
stranding Modules that are no longer reachable, and if you use a
sequence of SBDebuggers unreachable modules can also get stranded. If
you run a long-lived lldb process and are iteratively developing on a
large code base, lldb's memory gets filled with useless Modules.

This patch adds a test for the mode that currently works:

(lldb) target create foo
(lldb) run
&lt;rebuild foo outside lldb&gt;
(lldb) run

In that case, we do delete the unreachable Modules.

The next step will be to add tests for the cases where we fail to do
this, then see how to safely/efficiently evict unreachable modules in
those cases as well.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When you debug a binary and the change &amp; rebuild and then rerun in lldb
w/o quitting lldb, the Modules in the Global Module Cache for the old
binary &amp; .o files if used are now "unreachable". Nothing in lldb is
holding them alive, and they've already been unlinked. lldb will
properly discard them if there's not another Target referencing them.

However, this only works in simple cases at present. If you have several
Targets that reference the same modules, it's pretty easy to end up
stranding Modules that are no longer reachable, and if you use a
sequence of SBDebuggers unreachable modules can also get stranded. If
you run a long-lived lldb process and are iteratively developing on a
large code base, lldb's memory gets filled with useless Modules.

This patch adds a test for the mode that currently works:

(lldb) target create foo
(lldb) run
&lt;rebuild foo outside lldb&gt;
(lldb) run

In that case, we do delete the unreachable Modules.

The next step will be to add tests for the cases where we fail to do
this, then see how to safely/efficiently evict unreachable modules in
those cases as well.</pre>
</div>
</content>
</entry>
</feed>
