Hi Stéphanie,
Thanks for looking again into this,
On 02/03/2014 02:08 AM, Stéphanie Ouillon wrote:
Ivan forwarded me the script Jim wrote to benchmark the impact of
tainting on SpiderMonkey (see attachments, I fixed bits in the patch to
apply it on recent mozilla-central code).
I look at the patch as well as the benchmark[1], I have multiple comments on
them:
- The patch does not instrument the CodeGenerator which inline CharAt[2].
This means that if we compile the JS function only the concat
instrumentation would be be testing this flag. (also, the concat
instrumentation is not needed, as we need to flatten a string before reading
anything from it)
- AssertEq is a C++ function, and this would add some overhead for just
doing a flatten. Comparing the 2 strings in JS would be better, but then we
also need to instrument the CodeGen.
- Use an extra functions which contains the inner loop, as we are only
interested in this function and not on the top-level script.
- Using a gc() call here may have a nasty effect with OSR
(on-stack-replacement), because we are jumping into Ion only from the
outer-loop, so I don't think we are even using the result of Ion's compilation.
- The loop runs 10000 times, and results are only divided by 1000 (not
really important)
I ran the tests several times (performance mode, in console) on commits
Your results are a bit noisy, did you "pkill -18 firefox" before running
these benchmarks?
I don't know what was intended to be done after that, so I'm posting the
results here to have any feedback.
I think this is a way to highlight that checking this extra bit is not
changing the performance profile of the engine. But this does not deal with
the maintenance issue question that I raised previously.
[1] https://gist.github.com/arroway/617c534a7e4cb24adeab
[2]
http://dxr.mozilla.org/mozilla-central/source/js/src/jit/CodeGenerator.cpp#5006
--
Nicolas B. Pierron
_______________________________________________
dev-tech-js-engine-internals mailing list
dev-tech-js-engine-internals@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals