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

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

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years, 7 months ago by Jeffrey Yasskin
Modified:
16 years, 6 months ago
Reviewers:
Collin Winter
CC:
unladen-swallow_googlegroups.com
Base URL:
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 (+248 lines, -41 lines) Patch
M Include/_llvmfunctionobject.h View 1 2 3 4 2 chunks +11 lines, -3 lines 0 comments Download
M Makefile.pre.in View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M Misc/SpecialBuilds.txt View 4 1 chunk +1 line, -0 lines 0 comments Download
M Objects/_llvmfunctionobject.cc View 1 2 3 4 3 chunks +84 lines, -12 lines 0 comments Download
M Python/global_llvm_data.h View 1 2 3 4 3 chunks +16 lines, -3 lines 0 comments Download
M Python/global_llvm_data.cc View 1 2 3 4 6 chunks +57 lines, -6 lines 0 comments Download
M Python/llvm_compile.cc View 1 2 3 4 2 chunks +5 lines, -4 lines 0 comments Download
M Python/llvm_fbuilder.h View 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M Python/llvm_fbuilder.cc View 2 3 4 7 chunks +10 lines, -10 lines 0 comments Download
M Python/llvm_notes.txt View 1 chunk +16 lines, -0 lines 0 comments Download
M Util/Stats.h View 4 1 chunk +21 lines, -0 lines 0 comments Download
A Util/Stats.cc View 1 chunk +22 lines, -0 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.
16 years, 7 months ago (2009-11-03 23:06:43 UTC) #1
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. ...
16 years, 7 months ago (2009-11-10 00:13:19 UTC) #2
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 ...
16 years, 6 months ago (2009-11-18 21:58:59 UTC) #3
Collin Winter
16 years, 6 months ago (2009-11-18 22:04:42 UTC) #4
LGTM
Sign in to reply to this message.

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