Changeset 243843 in webkit
- Timestamp:
- Apr 3, 2019, 6:28:49 PM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
runtime/Options.cpp (modified) (1 diff)
-
runtime/Options.h (modified) (1 diff)
-
runtime/RandomizingFuzzerAgent.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r243841 r243843 1 2019-04-03 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Add dump feature for RandomizingFuzzerAgent 4 https://bugs.webkit.org/show_bug.cgi?id=196586 5 6 Reviewed by Saam Barati. 7 8 Towards deterministic tests for the results from randomizing fuzzer agent, this patch adds Options::dumpRandomizingFuzzerAgentPredictions, which dumps the generated types. 9 The results is like this. 10 11 getPrediction name:(#C2q9xD),bytecodeIndex:(22),original:(Array),generated:(OtherObj|Array|Float64Array|BigInt|NonIntAsDouble) 12 getPrediction name:(makeUnwriteableUnconfigurableObject#AiEJv1),bytecodeIndex:(14),original:(OtherObj),generated:(Final|Uint8Array|Float64Array|SetObject|WeakSetObject|BigInt|NonIntAsDouble) 13 14 * runtime/Options.cpp: 15 (JSC::recomputeDependentOptions): 16 * runtime/Options.h: 17 * runtime/RandomizingFuzzerAgent.cpp: 18 (JSC::RandomizingFuzzerAgent::getPrediction): 19 1 20 2019-04-03 Myles C. Maxfield <mmaxfield@apple.com> 2 21 -
trunk/Source/JavaScriptCore/runtime/Options.cpp
r243312 r243843 452 452 || Options::verboseCFA() 453 453 || Options::verboseDFGFailure() 454 || Options::verboseFTLFailure()) 454 || Options::verboseFTLFailure() 455 || Options::dumpRandomizingFuzzerAgentPredictions()) 455 456 Options::alwaysComputeHash() = true; 456 457 -
trunk/Source/JavaScriptCore/runtime/Options.h
r243832 r243843 437 437 v(bool, useRandomizingFuzzerAgent, false, Normal, nullptr) \ 438 438 v(unsigned, seedOfRandomizingFuzzerAgent, 1, Normal, nullptr) \ 439 v(bool, dumpRandomizingFuzzerAgentPredictions, false, Normal, nullptr) \ 439 440 \ 440 441 v(bool, logPhaseTimes, false, Normal, nullptr) \ -
trunk/Source/JavaScriptCore/runtime/RandomizingFuzzerAgent.cpp
r243832 r243843 34 34 } 35 35 36 SpeculatedType RandomizingFuzzerAgent::getPrediction(CodeBlock* , int, SpeculatedType)36 SpeculatedType RandomizingFuzzerAgent::getPrediction(CodeBlock* codeBlock, int bytecodeIndex, SpeculatedType original) 37 37 { 38 38 auto locker = holdLock(m_lock); 39 39 uint32_t high = m_random.getUint32(); 40 40 uint32_t low = m_random.getUint32(); 41 uint64_t result = (static_cast<uint64_t>(high) << 32) | low; 42 return static_cast<SpeculatedType>(result) & SpecFullTop; 41 SpeculatedType generated = static_cast<SpeculatedType>((static_cast<uint64_t>(high) << 32) | low) & SpecFullTop; 42 if (Options::dumpRandomizingFuzzerAgentPredictions()) 43 dataLogLn("getPrediction name:(", codeBlock->inferredName(), "#", codeBlock->hashAsStringIfPossible(), "),bytecodeIndex:(", bytecodeIndex, "),original:(", SpeculationDump(original), "),generated:(", SpeculationDump(generated), ")"); 44 return generated; 43 45 } 44 46
Note:
See TracChangeset
for help on using the changeset viewer.