|
|
Description[Tracing] Use TracingCategoryObserver in runtime statistics
This patch is a follow-up patch to enable runtime statistics to use
TracingCategoryObserver.
BUG=v8:5590
Committed: https://crrev.com/82f52d07d10122eb17d6a7e0cf9cd050c97209cb
Cr-Commit-Position: refs/heads/master@{#40745}
Patch Set 1 #
Total comments: 6
Patch Set 2 : address cbruni's comments #
Total comments: 9
Patch Set 3 : address alph's comments #Patch Set 4 : update #Patch Set 5 : rebase #Patch Set 6 : update #
Messages
Total messages: 65 (38 generated)
The CQ bit was checked by lpy@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lpy@chromium.org changed reviewers: + cbruni@chromium.org, fmeawad@chromium.org
PTAL.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
LGTM with nit. https://codereview.chromium.org/2460973003/diff/1/src/isolate.cc File src/isolate.cc (right): https://codereview.chromium.org/2460973003/diff/1/src/isolate.cc#newcode2742 src/isolate.cc:2742: v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE)) { Isn't this just "FLAG_runtime_stats == v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE"? https://codereview.chromium.org/2460973003/diff/1/src/log.cc File src/log.cc (right): https://codereview.chromium.org/2460973003/diff/1/src/log.cc#newcode1288 src/log.cc:1288: v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE)) { same here.
Please sync with alph@ given that his CL (https://codereview.chromium.org/2461733005) does almost the same. You may wanna merge the two CLs, I'll leave this up to you two :) https://codereview.chromium.org/2460973003/diff/1/src/compiler-dispatcher/com... File src/compiler-dispatcher/compiler-dispatcher-tracer.cc (right): https://codereview.chromium.org/2460973003/diff/1/src/compiler-dispatcher/com... src/compiler-dispatcher/compiler-dispatcher-tracer.cc:26: if (FLAG_runtime_stats) { nit: I think you want to use the V8_UNLIKELY(FLAG_runtime_stats) almost everywhere.
Description was changed from ========== [Tracing] Use TracingCategoryObserver in runtime statistics This patch is a follow-up patch to enable runtime statistics to use TracingCategoryObserver. ========== to ========== [Tracing] Use TracingCategoryObserver in runtime statistics This patch is a follow-up patch to enable runtime statistics to use TracingCategoryObserver. BUG=v8:5590 ==========
The CQ bit was checked by lpy@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
thanks for the comments. https://codereview.chromium.org/2460973003/diff/1/src/compiler-dispatcher/com... File src/compiler-dispatcher/compiler-dispatcher-tracer.cc (right): https://codereview.chromium.org/2460973003/diff/1/src/compiler-dispatcher/com... src/compiler-dispatcher/compiler-dispatcher-tracer.cc:26: if (FLAG_runtime_stats) { On 2016/10/31 09:59:49, Camillo Bruni wrote: > nit: I think you want to use the V8_UNLIKELY(FLAG_runtime_stats) almost > everywhere. Done. https://codereview.chromium.org/2460973003/diff/1/src/isolate.cc File src/isolate.cc (right): https://codereview.chromium.org/2460973003/diff/1/src/isolate.cc#newcode2742 src/isolate.cc:2742: v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE)) { On 2016/10/31 09:39:41, Camillo Bruni wrote: > Isn't this just "FLAG_runtime_stats == > v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE"? Done. https://codereview.chromium.org/2460973003/diff/1/src/log.cc File src/log.cc (right): https://codereview.chromium.org/2460973003/diff/1/src/log.cc#newcode1288 src/log.cc:1288: v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE)) { On 2016/10/31 09:39:41, Camillo Bruni wrote: > same here. Done.
Patchset #2 (id:20001) has been deleted
The CQ bit was checked by lpy@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
alph@chromium.org changed reviewers: + alph@chromium.org
lgtm https://codereview.chromium.org/2460973003/diff/40001/src/isolate.cc File src/isolate.cc (right): https://codereview.chromium.org/2460973003/diff/40001/src/isolate.cc#newcode2742 src/isolate.cc:2742: v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE)) { Why '==' ? It seems to me that it should be '&' instead. We still want to print out the counters even if tracing is enabled. https://codereview.chromium.org/2460973003/diff/40001/src/log.cc File src/log.cc (right): https://codereview.chromium.org/2460973003/diff/40001/src/log.cc#newcode1287 src/log.cc:1287: if (V8_UNLIKELY(FLAG_runtime_stats == ditto
https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc File src/counters.cc (right): https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc#newcode347 src/counters.cc:347: if (V8_LIKELY(FLAG_runtime_stats == 0)) { nit: no need {} for return; https://codereview.chromium.org/2460973003/diff/40001/src/tracing/tracing-cat... File src/tracing/tracing-category-observer.cc (right): https://codereview.chromium.org/2460973003/diff/40001/src/tracing/tracing-cat... src/tracing/tracing-category-observer.cc:38: v8::internal::FLAG_runtime_stats ^= ENABLED_BY_TRACING; This won't work. The category might not have been enabled before.
The CQ bit was checked by lpy@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
thanks for the comments, I updated the CL. https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc File src/counters.cc (right): https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc#newcode347 src/counters.cc:347: if (V8_LIKELY(FLAG_runtime_stats == 0)) { On 2016/10/31 20:46:53, alph wrote: > nit: no need {} for return; I think Yang once mentioned V8 prefers {} https://codereview.chromium.org/2460973003/diff/40001/src/isolate.cc File src/isolate.cc (right): https://codereview.chromium.org/2460973003/diff/40001/src/isolate.cc#newcode2742 src/isolate.cc:2742: v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE)) { On 2016/10/31 20:43:54, alph wrote: > Why '==' ? > It seems to me that it should be '&' instead. We still want to print out the > counters even if tracing is enabled. No we don't want to print counters if tracing is enabled, tracing will have a higher priority, that means when tracing and command line are enabled, we ignore command line. https://codereview.chromium.org/2460973003/diff/40001/src/log.cc File src/log.cc (right): https://codereview.chromium.org/2460973003/diff/40001/src/log.cc#newcode1287 src/log.cc:1287: if (V8_UNLIKELY(FLAG_runtime_stats == On 2016/10/31 20:43:54, alph wrote: > ditto No we don't want to print counters if tracing is enabled, tracing will have a higher priority, that means when tracing and command line are enabled, we ignore command line. https://codereview.chromium.org/2460973003/diff/40001/src/tracing/tracing-cat... File src/tracing/tracing-category-observer.cc (right): https://codereview.chromium.org/2460973003/diff/40001/src/tracing/tracing-cat... src/tracing/tracing-category-observer.cc:38: v8::internal::FLAG_runtime_stats ^= ENABLED_BY_TRACING; On 2016/10/31 20:46:53, alph wrote: > This won't work. The category might not have been enabled before. Done. ah you are right, I think the original one will work.
https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc File src/counters.cc (right): https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc#newcode347 src/counters.cc:347: if (V8_LIKELY(FLAG_runtime_stats == 0)) { On 2016/10/31 20:54:19, lpy wrote: > On 2016/10/31 20:46:53, alph wrote: > > nit: no need {} for return; > > I think Yang once mentioned V8 prefers {} Interesting. the code style guide https://google.github.io/styleguide/cppguide.html states that you don't need {} for single-line statements
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by lpy@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2016/10/31 21:17:19, alph wrote: > https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc > File src/counters.cc (right): > > https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc#newcode347 > src/counters.cc:347: if (V8_LIKELY(FLAG_runtime_stats == 0)) { > On 2016/10/31 20:54:19, lpy wrote: > > On 2016/10/31 20:46:53, alph wrote: > > > nit: no need {} for return; > > > > I think Yang once mentioned V8 prefers {} > > Interesting. the code style guide > https://google.github.io/styleguide/cppguide.html states that you don't need {} > for single-line statements mmmmm, agree, I updated it. Thanks.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/27616)
lpy@chromium.org changed reviewers: + bmeurer@chromium.org, mlippautz@chromium.org
+bmeurer@ for ic/ and crankshaft/ +mlippautz@ for heap/ PTAL.
On 2016/10/31 22:25:03, lpy wrote: > On 2016/10/31 21:17:19, alph wrote: > > https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc > > File src/counters.cc (right): > > > > > https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc#newcode347 > > src/counters.cc:347: if (V8_LIKELY(FLAG_runtime_stats == 0)) { > > On 2016/10/31 20:54:19, lpy wrote: > > > On 2016/10/31 20:46:53, alph wrote: > > > > nit: no need {} for return; > > > > > > I think Yang once mentioned V8 prefers {} > > > > Interesting. the code style guide > > https://google.github.io/styleguide/cppguide.html states that you don't need > {} > > for single-line statements > > mmmmm, agree, I updated it. > > Thanks. I have one more question. Where is ENABLED_BY_NATIVE bit is set? The current --runtime-call-stats flag seems to be broken by change. Is it going to be superseded by the new flag, so to enable RCS one should pass --runtime-stats=1 ?
On 2016/10/31 23:38:57, alph wrote: > On 2016/10/31 22:25:03, lpy wrote: > > On 2016/10/31 21:17:19, alph wrote: > > > https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc > > > File src/counters.cc (right): > > > > > > > > > https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc#newcode347 > > > src/counters.cc:347: if (V8_LIKELY(FLAG_runtime_stats == 0)) { > > > On 2016/10/31 20:54:19, lpy wrote: > > > > On 2016/10/31 20:46:53, alph wrote: > > > > > nit: no need {} for return; > > > > > > > > I think Yang once mentioned V8 prefers {} > > > > > > Interesting. the code style guide > > > https://google.github.io/styleguide/cppguide.html states that you don't need > > {} > > > for single-line statements > > > > mmmmm, agree, I updated it. > > > > Thanks. > > I have one more question. > Where is ENABLED_BY_NATIVE bit is set? The current --runtime-call-stats flag > seems to be broken by change. Is it going to be superseded by the new flag, so > to enable RCS one should pass --runtime-stats=1 ? by command line, for example ./d8 --runtime-call-stats, it will set FLAG_runtime_stats to 1. What do you mean it's broken? if user want to use runtime stats through command line, they are supposed to use --runtime-call-stats, and it will set FLAG_runtime_stats to 1.
On 2016/10/31 23:41:56, lpy wrote: > On 2016/10/31 23:38:57, alph wrote: > > On 2016/10/31 22:25:03, lpy wrote: > > > On 2016/10/31 21:17:19, alph wrote: > > > > https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc > > > > File src/counters.cc (right): > > > > > > > > > > > > > > https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc#newcode347 > > > > src/counters.cc:347: if (V8_LIKELY(FLAG_runtime_stats == 0)) { > > > > On 2016/10/31 20:54:19, lpy wrote: > > > > > On 2016/10/31 20:46:53, alph wrote: > > > > > > nit: no need {} for return; > > > > > > > > > > I think Yang once mentioned V8 prefers {} > > > > > > > > Interesting. the code style guide > > > > https://google.github.io/styleguide/cppguide.html states that you don't > need > > > {} > > > > for single-line statements > > > > > > mmmmm, agree, I updated it. > > > > > > Thanks. > > > > I have one more question. > > Where is ENABLED_BY_NATIVE bit is set? The current --runtime-call-stats flag > > seems to be broken by change. Is it going to be superseded by the new flag, so > > to enable RCS one should pass --runtime-stats=1 ? > > by command line, for example ./d8 --runtime-call-stats, it will set > FLAG_runtime_stats to 1. What do you mean it's broken? if user want to use > runtime stats through command line, they are supposed to use > --runtime-call-stats, and it will set FLAG_runtime_stats to 1. I don't see where --runtime-call-stats sets FLAG_runtime_stats
On 2016/10/31 23:45:03, alph wrote: > On 2016/10/31 23:41:56, lpy wrote: > > On 2016/10/31 23:38:57, alph wrote: > > > On 2016/10/31 22:25:03, lpy wrote: > > > > On 2016/10/31 21:17:19, alph wrote: > > > > > https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc > > > > > File src/counters.cc (right): > > > > > > > > > > > > > > > > > > > > https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc#newcode347 > > > > > src/counters.cc:347: if (V8_LIKELY(FLAG_runtime_stats == 0)) { > > > > > On 2016/10/31 20:54:19, lpy wrote: > > > > > > On 2016/10/31 20:46:53, alph wrote: > > > > > > > nit: no need {} for return; > > > > > > > > > > > > I think Yang once mentioned V8 prefers {} > > > > > > > > > > Interesting. the code style guide > > > > > https://google.github.io/styleguide/cppguide.html states that you don't > > need > > > > {} > > > > > for single-line statements > > > > > > > > mmmmm, agree, I updated it. > > > > > > > > Thanks. > > > > > > I have one more question. > > > Where is ENABLED_BY_NATIVE bit is set? The current --runtime-call-stats flag > > > seems to be broken by change. Is it going to be superseded by the new flag, > so > > > to enable RCS one should pass --runtime-stats=1 ? > > > > by command line, for example ./d8 --runtime-call-stats, it will set > > FLAG_runtime_stats to 1. What do you mean it's broken? if user want to use > > runtime stats through command line, they are supposed to use > > --runtime-call-stats, and it will set FLAG_runtime_stats to 1. > > I don't see where --runtime-call-stats sets FLAG_runtime_stats ah, right, it's in another CL that already landed, https://cs.chromium.org/chromium/src/v8/src/flag-definitions.h?l=891 sorry for the confusion, I should have attached the link earlier.
On 2016/10/31 23:47:05, lpy wrote: > On 2016/10/31 23:45:03, alph wrote: > > On 2016/10/31 23:41:56, lpy wrote: > > > On 2016/10/31 23:38:57, alph wrote: > > > > On 2016/10/31 22:25:03, lpy wrote: > > > > > On 2016/10/31 21:17:19, alph wrote: > > > > > > https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc > > > > > > File src/counters.cc (right): > > > > > > > > > > > > > > > > > > > > > > > > > > > https://codereview.chromium.org/2460973003/diff/40001/src/counters.cc#newcode347 > > > > > > src/counters.cc:347: if (V8_LIKELY(FLAG_runtime_stats == 0)) { > > > > > > On 2016/10/31 20:54:19, lpy wrote: > > > > > > > On 2016/10/31 20:46:53, alph wrote: > > > > > > > > nit: no need {} for return; > > > > > > > > > > > > > > I think Yang once mentioned V8 prefers {} > > > > > > > > > > > > Interesting. the code style guide > > > > > > https://google.github.io/styleguide/cppguide.html states that you > don't > > > need > > > > > {} > > > > > > for single-line statements > > > > > > > > > > mmmmm, agree, I updated it. > > > > > > > > > > Thanks. > > > > > > > > I have one more question. > > > > Where is ENABLED_BY_NATIVE bit is set? The current --runtime-call-stats > flag > > > > seems to be broken by change. Is it going to be superseded by the new > flag, > > so > > > > to enable RCS one should pass --runtime-stats=1 ? > > > > > > by command line, for example ./d8 --runtime-call-stats, it will set > > > FLAG_runtime_stats to 1. What do you mean it's broken? if user want to use > > > runtime stats through command line, they are supposed to use > > > --runtime-call-stats, and it will set FLAG_runtime_stats to 1. > > > > I don't see where --runtime-call-stats sets FLAG_runtime_stats > > ah, right, it's in another CL that already landed, > https://cs.chromium.org/chromium/src/v8/src/flag-definitions.h?l=891 > > sorry for the confusion, I should have attached the link earlier. I see, thanks! Btw why runtime_stats needs to be a flag and not just a static variable?
> > > > > I have one more question. > > > > > Where is ENABLED_BY_NATIVE bit is set? The current --runtime-call-stats > > flag > > > > > seems to be broken by change. Is it going to be superseded by the new > > flag, > > > so > > > > > to enable RCS one should pass --runtime-stats=1 ? > > > > > > > > by command line, for example ./d8 --runtime-call-stats, it will set > > > > FLAG_runtime_stats to 1. What do you mean it's broken? if user want to use > > > > runtime stats through command line, they are supposed to use > > > > --runtime-call-stats, and it will set FLAG_runtime_stats to 1. > > > > > > I don't see where --runtime-call-stats sets FLAG_runtime_stats > > > > ah, right, it's in another CL that already landed, > > https://cs.chromium.org/chromium/src/v8/src/flag-definitions.h?l=891 > > > > sorry for the confusion, I should have attached the link earlier. > > I see, thanks! > Btw why runtime_stats needs to be a flag and not just a static variable? yes it can, a static variable is actually what we did before, which we prefer not to by taking advantage of V8 flag definition, because we can very easily set FLAG_runtime_stats to 1 when --runtime-call-stats gets passed in by using the macros, without writing extra code.
LGTM on ic + crankshaft.
On 2016/11/02 06:45:11, Benedikt Meurer wrote: > LGTM on ic + crankshaft. lgtm on heap/
The CQ bit was checked by lpy@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #5 (id:100001) has been deleted
The CQ bit was checked by lpy@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by lpy@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from cbruni@chromium.org, alph@chromium.org, bmeurer@chromium.org, mlippautz@chromium.org Link to the patchset: https://codereview.chromium.org/2460973003/#ps140001 (title: "update")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== [Tracing] Use TracingCategoryObserver in runtime statistics This patch is a follow-up patch to enable runtime statistics to use TracingCategoryObserver. BUG=v8:5590 ========== to ========== [Tracing] Use TracingCategoryObserver in runtime statistics This patch is a follow-up patch to enable runtime statistics to use TracingCategoryObserver. BUG=v8:5590 ==========
Message was sent while issue was closed.
Committed patchset #6 (id:140001)
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:140001) has been created in https://codereview.chromium.org/2469403005/ by lpy@chromium.org. The reason for reverting is: Static-Initializers failed on Ubuntu-12.04.
Message was sent while issue was closed.
This patch does not introduce statics. Doesn't it? The bot reports an internal error. Could it be a flake?
Message was sent while issue was closed.
On 2016/11/03 23:16:43, alph wrote: > This patch does not introduce statics. Doesn't it? > The bot reports an internal error. Could it be a flake? No we don't introduce statics in this patch. I am not sure if it's a flake, I will reland it soon.
Message was sent while issue was closed.
Description was changed from ========== [Tracing] Use TracingCategoryObserver in runtime statistics This patch is a follow-up patch to enable runtime statistics to use TracingCategoryObserver. BUG=v8:5590 ========== to ========== [Tracing] Use TracingCategoryObserver in runtime statistics This patch is a follow-up patch to enable runtime statistics to use TracingCategoryObserver. BUG=v8:5590 ==========
The CQ bit was checked by lpy@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== [Tracing] Use TracingCategoryObserver in runtime statistics This patch is a follow-up patch to enable runtime statistics to use TracingCategoryObserver. BUG=v8:5590 ========== to ========== [Tracing] Use TracingCategoryObserver in runtime statistics This patch is a follow-up patch to enable runtime statistics to use TracingCategoryObserver. BUG=v8:5590 ==========
Message was sent while issue was closed.
Committed patchset #6 (id:140001)
Message was sent while issue was closed.
Description was changed from ========== [Tracing] Use TracingCategoryObserver in runtime statistics This patch is a follow-up patch to enable runtime statistics to use TracingCategoryObserver. BUG=v8:5590 ========== to ========== [Tracing] Use TracingCategoryObserver in runtime statistics This patch is a follow-up patch to enable runtime statistics to use TracingCategoryObserver. BUG=v8:5590 Committed: https://crrev.com/059e077881baa7ab2344e984397a2db59c4e74db Cr-Commit-Position: refs/heads/master@{#40742} ==========
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/059e077881baa7ab2344e984397a2db59c4e74db Cr-Commit-Position: refs/heads/master@{#40742}
Message was sent while issue was closed.
Description was changed from ========== [Tracing] Use TracingCategoryObserver in runtime statistics This patch is a follow-up patch to enable runtime statistics to use TracingCategoryObserver. BUG=v8:5590 Committed: https://crrev.com/059e077881baa7ab2344e984397a2db59c4e74db Cr-Commit-Position: refs/heads/master@{#40742} ========== to ========== [Tracing] Use TracingCategoryObserver in runtime statistics This patch is a follow-up patch to enable runtime statistics to use TracingCategoryObserver. BUG=v8:5590 Committed: https://crrev.com/82f52d07d10122eb17d6a7e0cf9cd050c97209cb Cr-Commit-Position: refs/heads/master@{#40745} ==========
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/82f52d07d10122eb17d6a7e0cf9cd050c97209cb Cr-Commit-Position: refs/heads/master@{#40745} |