OLD | NEW |
---|---|
1 -- Copyright 2011 the V8 project authors. All rights reserved. | 1 -- Copyright 2011 the V8 project authors. All rights reserved. |
2 -- Redistribution and use in source and binary forms, with or without | 2 -- Redistribution and use in source and binary forms, with or without |
3 -- modification, are permitted provided that the following conditions are | 3 -- modification, are permitted provided that the following conditions are |
4 -- met: | 4 -- met: |
5 -- | 5 -- |
6 -- * Redistributions of source code must retain the above copyright | 6 -- * Redistributions of source code must retain the above copyright |
7 -- notice, this list of conditions and the following disclaimer. | 7 -- notice, this list of conditions and the following disclaimer. |
8 -- * Redistributions in binary form must reproduce the above | 8 -- * Redistributions in binary form must reproduce the above |
9 -- copyright notice, this list of conditions and the following | 9 -- copyright notice, this list of conditions and the following |
10 -- disclaimer in the documentation and/or other materials provided | 10 -- disclaimer in the documentation and/or other materials provided |
(...skipping 30 matching lines...) Expand all Loading... | |
41 local function TrackCause(name, lvl) | 41 local function TrackCause(name, lvl) |
42 io.write((" "):rep(lvl or 0), name, "\n") | 42 io.write((" "):rep(lvl or 0), name, "\n") |
43 if GC[name] then | 43 if GC[name] then |
44 local causes = GC[name] | 44 local causes = GC[name] |
45 for i = 1, #causes do | 45 for i = 1, #causes do |
46 local f = causes[i] | 46 local f = causes[i] |
47 if not T[f] then | 47 if not T[f] then |
48 T[f] = true | 48 T[f] = true |
49 TrackCause(f, (lvl or 0) + 1) | 49 TrackCause(f, (lvl or 0) + 1) |
50 end | 50 end |
51 | |
52 if f == '<GC>' then break end | |
Erik Corry
2011/10/04 11:25:23
Deliberate?
Vyacheslav Egorov (Chromium)
2011/10/04 11:30:29
Yes. Otherwise it goes too deep.
| |
51 end | 53 end |
52 end | 54 end |
53 end | 55 end |
54 | 56 |
55 for name, _ in pairs(GC) do | 57 for name, _ in pairs(GC) do |
56 if name:match(P) then | 58 if name:match(P) then |
57 T = {} | 59 T = {} |
58 TrackCause(name) | 60 TrackCause(name) |
59 end | 61 end |
60 end | 62 end |
OLD | NEW |