Commit Graph

186 Commits

Author SHA1 Message Date
nverne
5d51583c0c Changes api logging for FunctionTemplate_NewWithCache.
https://codereview.chromium.org/2405213002/ introduced FunctionTemplate::NewWithCache in src/api.cc, but used LOG_API(..., NewWithFastHandler)

BUG=667237

Review-Url: https://codereview.chromium.org/2559643003
Cr-Commit-Position: refs/heads/master@{#41604}
2016-12-08 22:31:01 +00:00
verwaest
ce63eb08f9 [counters] Move waiting for more data from background-parsing into callbacks
BUG=

Review-Url: https://codereview.chromium.org/2549083002
Cr-Commit-Position: refs/heads/master@{#41492}
2016-12-05 15:47:12 +00:00
alph
50e50db7fd [profiler] Add CodeEvent entries for RCS counters statically on profiler start.
BUG=chromium:665398

Review-Url: https://codereview.chromium.org/2549653002
Cr-Commit-Position: refs/heads/master@{#41462}
2016-12-02 20:03:44 +00:00
ishell
e7a51fff24 [ic] Ensure state of load/store ICs always progresses.
... even when a receiver is not an object.

BUG=v8:5697

Review-Url: https://codereview.chromium.org/2548753003
Cr-Commit-Position: refs/heads/master@{#41458}
2016-12-02 15:07:31 +00:00
cbruni
95c0ecee66 [counters] Avoid V8_EXPORT_PRIVATE to speed up compilation under windows
BUG=chromium:668748

Review-Url: https://codereview.chromium.org/2534123002
Cr-Commit-Position: refs/heads/master@{#41351}
2016-11-29 11:57:30 +00:00
cbruni
244dd002c5 [counters] RuntimeStats: fix wrong bookkeeping when dynamically changing counters
RuntimeTimerScopes always subtract their own time from the parent timer's
counter to properly account for the own time. Once a scope is destructed it
adds it own timer to the current active counter. However, if the current
counter is changed with CorrectCurrentCounterId we will attribute all the
subtimers to the previous counter, and add the own time to the new counter.
This way it is possible to end up with negative times in certain counters but
the overall would still be correct.

BUG=

Review-Url: https://codereview.chromium.org/2511093002
Cr-Commit-Position: refs/heads/master@{#41254}
2016-11-24 10:05:37 +00:00
cbruni
c3e0ef8b00 [gc] Add runtime timer for gc prologue and epilogue callbacks
BUG=

Review-Url: https://codereview.chromium.org/2524733007
Cr-Commit-Position: refs/heads/master@{#41233}
2016-11-23 18:00:17 +00:00
machenbach
e4a15a7b4e Revert of [counters] RuntimeStats: fix wrong bookkeeping when dynamically changing counters. (patchset #15 id:320001 of https://codereview.chromium.org/2511093002/ )
Reason for revert:
The test is very flaky on the bots, e.g.:
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20ASAN/builds/17031
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20shared/builds/14776

Original issue's description:
> [counters] RuntimeStats: fix wrong bookkeeping when dynamically changing counters
>
> RuntimeTimerScopes always subtract their own time from the parent timer's
> counter to properly account for the own time. Once a scope is destructed it
> adds it own timer to the current active counter. However, if the current
> counter is changed with CorrectCurrentCounterId we will attribute all the
> subtimers to the previous counter, and add the own time to the new counter.
> This way it is possible to end up with negative times in certain counters but
> the overall would still be correct.
>
> BUG=
>
> Committed: https://crrev.com/f6c74d964d9387df4bed3d8c1ded51eb9e8aa6e8
> Committed: https://crrev.com/491651792d7818aed04eaeffb9890b5a309b543e
> Cr-Original-Commit-Position: refs/heads/master@{#41142}
> Cr-Commit-Position: refs/heads/master@{#41214}

TBR=ishell@chromium.org,fmeawad@chromium.org,lpy@chromium.org,cbruni@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.chromium.org/2526843002
Cr-Commit-Position: refs/heads/master@{#41229}
2016-11-23 15:27:49 +00:00
cbruni
491651792d [counters] RuntimeStats: fix wrong bookkeeping when dynamically changing counters
RuntimeTimerScopes always subtract their own time from the parent timer's
counter to properly account for the own time. Once a scope is destructed it
adds it own timer to the current active counter. However, if the current
counter is changed with CorrectCurrentCounterId we will attribute all the
subtimers to the previous counter, and add the own time to the new counter.
This way it is possible to end up with negative times in certain counters but
the overall would still be correct.

BUG=

Committed: https://crrev.com/f6c74d964d9387df4bed3d8c1ded51eb9e8aa6e8
Review-Url: https://codereview.chromium.org/2511093002
Cr-Original-Commit-Position: refs/heads/master@{#41142}
Cr-Commit-Position: refs/heads/master@{#41214}
2016-11-23 12:23:16 +00:00
cbruni
10a31136c4 Revert of [counters] RuntimeStats: fix wrong bookkeeping when dynamically changing counters. (patchset #10 id:180001 of https://codereview.chromium.org/2511093002/ )
Reason for revert:
Wronged it even more.

Original issue's description:
> [counters] RuntimeStats: fix wrong bookkeeping when dynamically changing counters
>
> RuntimeTimerScopes always subtract their own time from the parent timer's
> counter to properly account for the own time. Once a scope is destructed it
> adds it own timer to the current active counter. However, if the current
> counter is changed with CorrectCurrentCounterId we will attribute all the
> subtimers to the previous counter, and add the own time to the new counter.
> This way it is possible to end up with negative times in certain counters but
> the overall would still be correct.
>
> BUG=
>
> Committed: https://crrev.com/f6c74d964d9387df4bed3d8c1ded51eb9e8aa6e8
> Cr-Commit-Position: refs/heads/master@{#41142}

TBR=ishell@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.chromium.org/2519073002
Cr-Commit-Position: refs/heads/master@{#41150}
2016-11-21 16:00:56 +00:00
cbruni
f6c74d964d [counters] RuntimeStats: fix wrong bookkeeping when dynamically changing counters
RuntimeTimerScopes always subtract their own time from the parent timer's
counter to properly account for the own time. Once a scope is destructed it
adds it own timer to the current active counter. However, if the current
counter is changed with CorrectCurrentCounterId we will attribute all the
subtimers to the previous counter, and add the own time to the new counter.
This way it is possible to end up with negative times in certain counters but
the overall would still be correct.

BUG=

Review-Url: https://codereview.chromium.org/2511093002
Cr-Commit-Position: refs/heads/master@{#41142}
2016-11-21 13:45:29 +00:00
cbruni
7e4e34bb8f [counters] Use separate counters for background parsing
BUG=

Review-Url: https://codereview.chromium.org/2509683002
Cr-Commit-Position: refs/heads/master@{#41047}
2016-11-16 18:51:48 +00:00
cbruni
bb6a626b76 [counters] Implement off-isolate RuntimeCallStats for the Preparser
BUG=

Review-Url: https://codereview.chromium.org/2490643002
Cr-Commit-Position: refs/heads/master@{#41001}
2016-11-15 16:08:50 +00:00
ishell
bcb3af59be [ic] Support data handlers that represent transitioning stores.
BUG=v8:5561

Review-Url: https://codereview.chromium.org/2488673004
Cr-Commit-Position: refs/heads/master@{#40946}
2016-11-13 09:38:15 +00:00
ishell
f15373fdab [ic] Detailize some elements store specific runtime call stats counters.
BUG=v8:5561

Review-Url: https://codereview.chromium.org/2489293002
Cr-Commit-Position: refs/heads/master@{#40890}
2016-11-10 12:39:43 +00:00
ishell
bdf04d99cd [ic] Support Api getters by data handlers.
BUG=v8:5561

Review-Url: https://codereview.chromium.org/2479373006
Cr-Commit-Position: refs/heads/master@{#40839}
2016-11-08 14:38:50 +00:00
alph
c57e54b389 [profiler] Introduce lightweight mode for Rutime Call Stats collection.
In the lightweight mode it only maintains pseudo stack and does not
collect timing information. It can be used in the sampling mode.

BUG=chromium:660428

Review-Url: https://codereview.chromium.org/2472193002
Cr-Commit-Position: refs/heads/master@{#40812}
2016-11-07 18:14:14 +00:00
lpy
82f52d07d1 [Tracing] Use TracingCategoryObserver in runtime statistics
This patch is a follow-up patch to enable runtime statistics to use
TracingCategoryObserver.

BUG=v8:5590

Review-Url: https://codereview.chromium.org/2460973003
Cr-Commit-Position: refs/heads/master@{#40745}
2016-11-04 00:31:32 +00:00
lpy
5df5a28f2c Revert of [Tracing] Use TracingCategoryObserver in runtime statistics (patchset #6 id:140001 of https://codereview.chromium.org/2460973003/ )
Reason for revert:
Static-Initializers failed on Ubuntu-12.04

Original issue's description:
> [Tracing] Use TracingCategoryObserver in runtime statistics
>
> This patch is a follow-up patch to enable runtime statistics to use
> TracingCategoryObserver.
>
> BUG=v8:5590

TBR=cbruni@chromium.org,fmeawad@chromium.org,alph@chromium.org,bmeurer@chromium.org,mlippautz@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5590

Review-Url: https://codereview.chromium.org/2469403005
Cr-Commit-Position: refs/heads/master@{#40743}
2016-11-03 23:11:22 +00:00
lpy
059e077881 [Tracing] Use TracingCategoryObserver in runtime statistics
This patch is a follow-up patch to enable runtime statistics to use
TracingCategoryObserver.

BUG=v8:5590

Review-Url: https://codereview.chromium.org/2460973003
Cr-Commit-Position: refs/heads/master@{#40742}
2016-11-03 21:37:05 +00:00
ishell
9377226a73 [ic] Data handlers for loads of non-existent properties.
BUG=v8:5561

Review-Url: https://codereview.chromium.org/2471613006
Cr-Commit-Position: refs/heads/master@{#40735}
2016-11-03 17:15:29 +00:00
alph
fdca1bb2da [profiler] Make certain Runtime Call Stats fields atomic.
Make RuntimeCallTimer::parent_ and RuntimeCallStats::current_timer_
fields atomic as they are accessed from the signal handler.

BUG=chromium:660428

Review-Url: https://codereview.chromium.org/2464973002
Cr-Commit-Position: refs/heads/master@{#40709}
2016-11-02 18:50:36 +00:00
ishell
597315dc13 [ic] Detailize some IC-specific runtime call stats counters.
This CL adds Load/StoreIC_Premonomorphic and detailizes IC_HandlerCacheHit bucket.

BUG=v8:5561

Review-Url: https://codereview.chromium.org/2459333003
Cr-Commit-Position: refs/heads/master@{#40679}
2016-10-31 17:48:34 +00:00
alph
aee3542fcf [profiler] Emit runtime call stats into sampling profile
These are added to the sampler stack trace when RCS are
enabled.
Resource name for a RCS frame is reported as "V8Runtime".
Counter names match ones from src/counters.h

BUG=chromium:660428

Review-Url: https://codereview.chromium.org/2461003002
Cr-Commit-Position: refs/heads/master@{#40658}
2016-10-28 20:18:12 +00:00
lpy
92d9a56a15 [Tracing] Fix inaccurate timer calculation in runtime statistics.
Previously we reset runtime counters and dump them when we enter, exit top level
trace events respectively. However, there is gap between two top level trace
events and runtime counters may be activated, resetting the counters makes the
accumulated time inaccurate, and we may end up with negative time due to the
nature of how we accumulate time.

This patch fixes this problem by only resetting counters when there's no
counters active, and before dump counters, we traverse current active counters
to calculate their time, and then restart their timer.

BUG=chromium:658145

Review-Url: https://codereview.chromium.org/2457523002
Cr-Commit-Position: refs/heads/master@{#40653}
2016-10-28 18:05:22 +00:00
jochen
b3bdb05f71 Add runtime callstats scopes to some internal accessors
BUG=v8:5557
R=cbruni@chromium.org

Review-Url: https://codereview.chromium.org/2448473002
Cr-Commit-Position: refs/heads/master@{#40560}
2016-10-25 12:31:05 +00:00
marja
55277d9969 Remove unused parsing related histograms.
R=jochen@chromium.org
BUG=chromium:656854

Review-Url: https://codereview.chromium.org/2427933002
Cr-Commit-Position: refs/heads/master@{#40540}
2016-10-24 17:08:04 +00:00
ishell
c2a5dc81c7 [ic] Support data handlers that represent simple field stores.
BUG=

Review-Url: https://codereview.chromium.org/2438553003
Review-Url: https://codereview.chromium.org/2438553003
Cr-Original-Original-Commit-Position: refs/heads/master@{#40503}
Cr-Original-Commit-Position: refs/heads/master@{#40511}
Cr-Commit-Position: refs/heads/master@{#40524}
2016-10-24 10:00:49 +00:00
ishell
80f163ce34 Revert of [ic] Support data handlers that represent simple field stores. (patchset #2 id:40001 of https://codereview.chromium.org/2438553003/ )
Reason for revert:
http://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/9306 "V8 Mac GC Stress"

Original issue's description:
> [ic] Support data handlers that represent simple field stores.
>
> BUG=
>
> Review-Url: https://codereview.chromium.org/2438553003
> Cr-Commit-Position: refs/heads/master@{#40503}

TBR=jkummerow@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://chromiumcodereview.appspot.com/2442523003
Cr-Commit-Position: refs/heads/master@{#40512}
2016-10-21 17:54:27 +00:00
ishell
d2557f2e9d [ic] Support data handlers that represent simple field stores.
BUG=

Review-Url: https://codereview.chromium.org/2438553003
Review-Url: https://chromiumcodereview.appspot.com/2438553003
Cr-Original-Commit-Position: refs/heads/master@{#40503}
Cr-Commit-Position: refs/heads/master@{#40511}
2016-10-21 16:42:40 +00:00
jgruber
a4ff04ab13 Revert of [ic] Support data handlers that represent simple field stores. (patchset #1 id:20001 of https://chromiumcodereview.appspot.com/2438553003/ )
Reason for revert:
http://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/9299

Original issue's description:
> [ic] Support data handlers that represent simple field stores.
>
> BUG=

TBR=jkummerow@chromium.org,ishell@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://chromiumcodereview.appspot.com/2439053002
Cr-Commit-Position: refs/heads/master@{#40505}
2016-10-21 12:46:44 +00:00
ishell
1f697f4231 [ic] Support data handlers that represent simple field stores.
BUG=

Review-Url: https://chromiumcodereview.appspot.com/2438553003
Cr-Commit-Position: refs/heads/master@{#40503}
2016-10-21 12:09:12 +00:00
lpy
65b3af466e Use TracedValue in runtime statistics.
We introduced TracedValue into V8 tracing previously, this patch uses it to
build JSON string of runtime statistics instead of using stringstream as buffer.

BUG=v8:5089
LOG=N

Review-Url: https://chromiumcodereview.appspot.com/2418303002
Cr-Commit-Position: refs/heads/master@{#40443}
2016-10-19 14:56:35 +00:00
cbruni
f8654ce9f6 Do not inline object-stats functions to reduce binary size.
BUG=chromium:645378

Review-Url: https://codereview.chromium.org/2422143002
Cr-Commit-Position: refs/heads/master@{#40355}
2016-10-17 11:10:08 +00:00
ishell
5acc31d863 [ic] Support data handlers that represent loads of constants from prototypes.
BUG=

Review-Url: https://codereview.chromium.org/2421883002
Cr-Commit-Position: refs/heads/master@{#40325}
2016-10-14 19:25:03 +00:00
ishell
d4a47fe6cc [ic] Smi-handlers are now able to represent loads of constants from descriptor array.
BUG=

Review-Url: https://codereview.chromium.org/2418063003
Cr-Commit-Position: refs/heads/master@{#40324}
2016-10-14 19:17:04 +00:00
verwaest
7899fcc524 Drop Lazy from parser method names and events
BUG=

Review-Url: https://codereview.chromium.org/2414383002
Cr-Commit-Position: refs/heads/master@{#40318}
2016-10-14 14:09:27 +00:00
ishell
ac886b0c1c [ic] Move Smi-handler creation code to SmiHandler class.
... to keep all the pieces in one place for easier modifications.

This CL also adds a new runtime call stats bucket: KeyedLoadIC_LoadElementDH.

BUG=

Review-Url: https://codereview.chromium.org/2412983008
Cr-Commit-Position: refs/heads/master@{#40314}
2016-10-14 12:37:32 +00:00
jochen
ad99b196cb Introduce a CompilerDispatcherTracer and track how long jobs take
R=ulan@chromium.org,cbruni@chromium.org,rmcilroy@chromium.org
BUG=v8:5215

Review-Url: https://codereview.chromium.org/2413243002
Cr-Commit-Position: refs/heads/master@{#40295}
2016-10-14 08:12:44 +00:00
ishell
73460009a6 [ic] Support data handlers that represent loads from prototypes.
This CL also adds separate runtime call stats buckets for data handlers.

BUG=

Review-Url: https://codereview.chromium.org/2419513002
Cr-Commit-Position: refs/heads/master@{#40281}
2016-10-13 16:19:24 +00:00
adamk
4453819c9a [modules] Allow Module::Instantiate to throw exceptions
Also prepare d8 for that eventuality, and fixup the runtime call stat
counter used for Module::Evaluate.

R=neis@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2366773002
Cr-Commit-Position: refs/heads/master@{#39647}
2016-09-22 23:06:20 +00:00
lpy
9e640b74b3 [Tracing] Remove unnecessary memory allocation in runtime call stats.
Previously we didn't implement TRACE_STR_COPY when we write trace events to
file, which causes us to allocate a growing independent memory chunk for dumped
runtime call stats table. Since we now have a fully functional TRACE_STR_COPY,
this memory allocation can be avoided, this patch removes it.

BUG=v8:5089

Committed: https://crrev.com/e1997bb7d780d12e3a89078e8dd652dcf1d90039
Review-Url: https://codereview.chromium.org/2342643004
Cr-Original-Commit-Position: refs/heads/master@{#39462}
Cr-Commit-Position: refs/heads/master@{#39510}
2016-09-19 21:01:29 +00:00
vogelheim
eb7ba29012 Revert of [Tracing] Remove unnecessary memory allocation in runtime call stats. (patchset #1 id:1 of https://codereview.chromium.org/2342643004/ )
Reason for revert:
Revert because this breaks V8's roll into Chromium. ASAN complains about memory accesses in a particular unit test.

Borked roll CL:
https://codereview.chromium.org/2348833002/

Reproduce breakage with:

1, args.gn:
  v8_deprecation_warnings = true
  use_goma = true
  is_asan = true
2, ninja -C out/... content_browsertests
3, out/.../content_browsertests --gtest_filter=V8SamplingProfilerTest.*

Original issue's description:
> [Tracing] Remove unnecessary memory allocation in runtime call stats.
>
> Previously we didn't implement TRACE_STR_COPY when we write trace events to
> file, which causes us to allocate a growing independent memory chunk for dumped
> runtime call stats table. Since we now have a fully functional TRACE_STR_COPY,
> this memory allocation can be avoided, this patch removes it.
>
> BUG=v8:5089
>
> Committed: https://crrev.com/e1997bb7d780d12e3a89078e8dd652dcf1d90039
> Cr-Commit-Position: refs/heads/master@{#39462}

TBR=cbruni@chromium.org,fmeawad@chromium.org,lpy@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5089

Review-Url: https://codereview.chromium.org/2349593004
Cr-Commit-Position: refs/heads/master@{#39475}
2016-09-16 14:21:31 +00:00
lpy
e1997bb7d7 [Tracing] Remove unnecessary memory allocation in runtime call stats.
Previously we didn't implement TRACE_STR_COPY when we write trace events to
file, which causes us to allocate a growing independent memory chunk for dumped
runtime call stats table. Since we now have a fully functional TRACE_STR_COPY,
this memory allocation can be avoided, this patch removes it.

BUG=v8:5089

Review-Url: https://codereview.chromium.org/2342643004
Cr-Commit-Position: refs/heads/master@{#39462}
2016-09-16 04:13:20 +00:00
cbruni
8dd2160c14 Add InvokeApiInterruptCallbacks runtime counter
This was one of the paths inside StackGuard that lacked a runtime counter,
making it hard to assess what was going on.

BUG=

Review-Url: https://codereview.chromium.org/2346863002
Cr-Commit-Position: refs/heads/master@{#39455}
2016-09-15 18:56:40 +00:00
lpy
b4c9706e02 Add delegating initialize method for RuntimeCallTimerScope.
BUG=v8:5089

Review-Url: https://codereview.chromium.org/2329053002
Cr-Commit-Position: refs/heads/master@{#39324}
2016-09-10 04:58:03 +00:00
lpy
252b84b0ed [Tracing] Fix runtime call stats tracing for GC.
This patch adds runtime call stats tracing for GC correctly, makes
--runtime-call-stats and tracing mutually exclusive with tracing taking
precedence if both modes are on, and uses only one runtime call stats in
counter.

BUG=v8:5089

Review-Url: https://codereview.chromium.org/2313193002
Cr-Commit-Position: refs/heads/master@{#39295}
2016-09-08 18:57:23 +00:00
franzih
b0a7738a5f [api] Add interceptor for getOwnPropertyDescriptor().
The existing PropertyQueryCallback intercepts getOwnPropertyDescriptor, but
it returns only value and attributes, not the accessors. This
PropertyDescriptorCallback returns a descriptor similar to Ecma-262 6.2.4.

You can either set a PropertyQueryCallback or a PropertyDescriptorCallback,
but not both. When you set a callback for DefineProperty(), you can set a
PropertyDescriptorCallback but not a PropertyQueryCallback.

BUG=v8:5359

Review-Url: https://codereview.chromium.org/2311873002
Cr-Commit-Position: refs/heads/master@{#39279}
2016-09-08 12:51:49 +00:00
ulan
371c7a388f [heap] Add histogram counters to track GC reasons.
BUG=chromium:644713
LOG=NO

Review-Url: https://codereview.chromium.org/2322453002
Cr-Commit-Position: refs/heads/master@{#39250}
2016-09-07 13:30:55 +00:00
fmeawad
5dd940082b [RuntimeCallStats] Fix reset scope for tracing
https://codereview.chromium.org/2296243002/ introduced 2 minor bugs
related to the Reset scope.

The tracing version requires that we reset the counters everytime we
start a new top level trace event, unless the top level one is not
really a top level (i.e. has the right type but called in a nested way)

Bugs are:
1- Reseting was guarded behind a check for the runtime call stats
version only.
2- We never set that we are already inside a scope, so the nested
case would fail as well.

R=lpy@chromium.org, cbruni@chromium.org
BUG=642373

Review-Url: https://codereview.chromium.org/2311033002
Cr-Commit-Position: refs/heads/master@{#39214}
2016-09-06 15:48:30 +00:00