Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(18)

Issue 144077: Run globaldce periodically to collect dead objects (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 month ago by Jeffrey Yasskin
Modified:
2 weeks, 2 days ago
Reviewers:
Collin Winter
CC:
unladen-swallow_googlegroups.com
SVN Base:
http://unladen-swallow.googlecode.com/svn/trunk/
Visibility:
Public.

Description

We give LLVM global objects ownership of the Python objects they mirror, but
until recently there was no way to safely free unused global objects. Now that
the ExecutionEngine supports it, this patch hooks up a mechanism.

This allows regrtest to complete under -j always after using ~1.6gb of memory.

On an instrumented test_llvm run, we get:

Number of globals collected by globaldce (n=338):
Min: 0
Median: 30
Mean: 30
Max: 101
Sum: 10346

Time for a globaldce run in ns (n=338):
Min: 462000
Median: 815500
Mean: 941295
Max: 5247000
Sum: 318158000

And for regrtest:

Number of globals collected by globaldce (n=22):
Min: 0
Median: 9
Mean: 72
Max: 290
Sum: 1588

Time for a globaldce run in ns (n=22):
Min: 726000
Median: 5039500
Mean: 10233772
Max: 34198000
Sum: 225143000

Patch Set 1

Patch Set 2 : Fix PyDict_Type crash

Patch Set 3 : Remove the AssertingVH

Patch Set 4 : Fix the WITH_INSTRUMENTATION build

Total comments: 12

Patch Set 5 : Fix Collin's comments

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
M Include/_llvmfunctionobject.h View 1 2 3 4 2 chunks 33 lines 0 comments Download
M Makefile.pre.in View 1 2 3 4 2 chunks 23 lines 0 comments Download
M Misc/SpecialBuilds.txt View 4 1 chunk 12 lines 0 comments Download
M Objects/_llvmfunctionobject.cc View 1 2 3 4 3 chunks 149 lines 0 comments Download
M Python/global_llvm_data.cc View 1 2 3 4 6 chunks 118 lines 0 comments Download
M Python/global_llvm_data.h View 1 2 3 4 3 chunks 47 lines 0 comments Download
M Python/llvm_compile.cc View 1 2 3 4 2 chunks 25 lines 0 comments Download
M Python/llvm_fbuilder.cc View 2 3 4 7 chunks 73 lines 0 comments Download
M Python/llvm_fbuilder.h View 2 3 4 1 chunk 14 lines 0 comments Download
M Python/llvm_notes.txt View 1 chunk 27 lines 0 comments Download
A Util/Stats.cc View 1 chunk 27 lines 0 comments Download
M Util/Stats.h View 4 1 chunk 30 lines 0 comments Download

Messages

Total messages: 4
Jeffrey Yasskin
PTAL. If you have time, please try it out and tell me if anything crashes.
1 month ago
Collin Winter
Please document this in Python/llvm_notes.txt. http://codereview.appspot.com/144077/diff/2001/2008 File Objects/_llvmfunctionobject.cc (left): http://codereview.appspot.com/144077/diff/2001/2008#oldcode103 Objects/_llvmfunctionobject.cc:103: // need it again. ...
3 weeks, 4 days ago
Jeffrey Yasskin
http://codereview.appspot.com/144077/diff/2001/2008 File Objects/_llvmfunctionobject.cc (left): http://codereview.appspot.com/144077/diff/2001/2008#oldcode103 Objects/_llvmfunctionobject.cc:103: // need it again. function->empty() can be used to ...
2 weeks, 2 days ago
Collin Winter
2 weeks, 2 days ago
LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r497