Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: tools/gcmole/gcmole.lua

Issue 9420046: In gcmole assume that methods exiting VM can cause GC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/gcmole/gcmole.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 .. " -D" .. arch_define 99 .. " -D" .. arch_define
100 .. " -DENABLE_DEBUGGER_SUPPORT" 100 .. " -DENABLE_DEBUGGER_SUPPORT"
101 .. " -Isrc" 101 .. " -Isrc"
102 end 102 end
103 103
104 function InvokeClangPluginForEachFile(filenames, cfg, func) 104 function InvokeClangPluginForEachFile(filenames, cfg, func)
105 local cmd_line = MakeClangCommandLine(cfg.plugin, 105 local cmd_line = MakeClangCommandLine(cfg.plugin,
106 cfg.plugin_args, 106 cfg.plugin_args,
107 cfg.triple, 107 cfg.triple,
108 cfg.arch_define) 108 cfg.arch_define)
109
110 for _, filename in ipairs(filenames) do 109 for _, filename in ipairs(filenames) do
111 log("-- %s", filename) 110 log("-- %s", filename)
112 local action = cmd_line .. " src/" .. filename .. " 2>&1" 111 local action = cmd_line .. " src/" .. filename .. " 2>&1"
113 if FLAGS.verbose then print('popen ', action) end 112 if FLAGS.verbose then print('popen ', action) end
114 local pipe = io.popen(action) 113 local pipe = io.popen(action)
115 func(filename, pipe:lines()) 114 func(filename, pipe:lines())
116 pipe:close() 115 pipe:close()
117 end 116 end
118 end 117 end
119 118
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 210
212 -- DirectCEntryStub is a special stub used on ARM. 211 -- DirectCEntryStub is a special stub used on ARM.
213 -- It is pinned and always present. 212 -- It is pinned and always present.
214 "DirectCEntryStub.*GenerateCall", 213 "DirectCEntryStub.*GenerateCall",
215 214
216 -- TODO GCMole currently is sensitive enough to understand that certain 215 -- TODO GCMole currently is sensitive enough to understand that certain
217 -- functions only cause GC and return Failure simulataneously. 216 -- functions only cause GC and return Failure simulataneously.
218 -- Callsites of such functions are safe as long as they are properly 217 -- Callsites of such functions are safe as long as they are properly
219 -- check return value and propagate the Failure to the caller. 218 -- check return value and propagate the Failure to the caller.
220 -- It should be possible to extend GCMole to understand this. 219 -- It should be possible to extend GCMole to understand this.
221 "Heap.*AllocateFunctionPrototype" 220 "Heap.*AllocateFunctionPrototype",
221
222 -- Ignore all StateTag methods.
223 "StateTag",
224
225 -- Ignore printing of elements transition.
226 "PrintElementsTransition"
222 }; 227 };
223 228
224 local function AddCause(name, cause) 229 local function AddCause(name, cause)
225 local t = gc_caused[name] 230 local t = gc_caused[name]
226 if not t then 231 if not t then
227 t = {} 232 t = {}
228 gc_caused[name] = t 233 gc_caused[name] = t
229 end 234 end
230 table.insert(t, cause) 235 table.insert(t, cause)
231 end 236 end
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 372
368 for _, arch in ipairs(ARCHS) do 373 for _, arch in ipairs(ARCHS) do
369 if not ARCHITECTURES[arch] then 374 if not ARCHITECTURES[arch] then
370 error ("Unknown arch: " .. arch) 375 error ("Unknown arch: " .. arch)
371 end 376 end
372 377
373 errors = SafeCheckCorrectnessForArch(arch, report) or errors 378 errors = SafeCheckCorrectnessForArch(arch, report) or errors
374 end 379 end
375 380
376 os.exit(errors and 1 or 0) 381 os.exit(errors and 1 or 0)
OLDNEW
« no previous file with comments | « tools/gcmole/gcmole.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698