Commit Graph

155 Commits

Author SHA1 Message Date
Stephan Herhut
34022a65b6 [wasm] Log wasm codes on module creation.
Delaying the logging until after module creating ensures that the
module has been fully parsed and hence that all names are available.

Also refactors the code to bring all code logging/disassembling into
one place.

Change-Id: I8219d70876d2ccd3a5ffb8250b46fdf60a46fe6c
Reviewed-on: https://chromium-review.googlesource.com/973443
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52146}
2018-03-22 13:17:39 +00:00
jgruber
391fb8fea7 [builtins] Remove unneeded code
It turns out that with the help of Code::Instruction{Start,End,Size}
helpers, we don't need custom profiler methods.

InstructionStream is now all-static.

Bug: v8:6666
Change-Id: I59e1d2d2cb72c128725a1ed03f11506d40e76224
Reviewed-on: https://chromium-review.googlesource.com/947973
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51837}
2018-03-09 11:42:09 +00:00
Stephan Herhut
7ecb6a38b9 Implement code creation events for wasm code on native heap
Adds support for generating logging/profiling event when wasm code gets compiled
on the native heap. As code objects on the native heap are not ordinary heap
objects, the existing abstractions for reporting cannot be used. Instead, add
specialized versions for WasmCode objects.

Change-Id: I808618d70142073b3c1b06edef6931f59bed8cf5
Reviewed-on: https://chromium-review.googlesource.com/913308
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51388}
2018-02-20 08:30:31 +00:00
jgruber
992f7cc9b3 [profiler] Emit code creation events for off-heap builtins
Bug: v8:6666
Change-Id: I8de39b6ce31b59e5a76267cb665d42f758309c2a
Reviewed-on: https://chromium-review.googlesource.com/897530
Reviewed-by: Franziska Hinkelmann <franzih@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51093}
2018-02-05 12:22:51 +00:00
Clemens Hammacher
e1e2aa06dd Refactor FATAL macro
Remove comment about usage of FATAL, UNREACHABLE and UNIMPLEMENTED,
which was deprecated since https://crrev.com/1410713006.
Also, refactor the FATAL macro and use it for implementing UNREACHABLE
and UNIMPLEMENTED, and in more code. The benefit over printf +
CHECK(false) is that the compiler knows that FATAL will never return.

R=bmeurer@chromium.org

Change-Id: I8c2ab3b4e6edfe8eff5ec6fdf3d92b15d0ed7126
Reviewed-on: https://chromium-review.googlesource.com/832726
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50183}
2017-12-19 07:57:12 +00:00
Camillo Bruni
1385b092e8 [log] Support first function execution logging with --log-function-events
Bug: chromium:757467
Change-Id: I52f8100e0c8b4ac07e1f875e44cb468fa8ce572b
Reviewed-on: https://chromium-review.googlesource.com/793611
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49764}
2017-11-30 16:38:59 +00:00
Camillo Bruni
c59d27d044 Reland "[log] Properly log all maps creating during bootstrapping"
This is a reland of acfef3ec93
Original change's description:
> [log] Properly log all maps creating during bootstrapping
> 
> Logger::LogMaps will print all maps currently present on the heap.
> 
> Note that currently this does not properly log the detailed transitions
> for these maps.
> 
> Change-Id: Ia3218d371549d7634fe3eda9e8e59b0b0bd8bebb
> Reviewed-on: https://chromium-review.googlesource.com/753885
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49444}

Change-Id: I57830f1e22c09981761bb92b9d28c96fbcc1ee80
Reviewed-on: https://chromium-review.googlesource.com/775958
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49699}
2017-11-29 09:08:17 +00:00
Michael Achenbach
c13b62d7db Revert "[log] Properly log all maps creating during bootstrapping"
This reverts commit acfef3ec93.

Reason for revert: Makes logmaps timeout in nosnap mode:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap/builds/18933

Original change's description:
> [log] Properly log all maps creating during bootstrapping
> 
> Logger::LogMaps will print all maps currently present on the heap.
> 
> Note that currently this does not properly log the detailed transitions
> for these maps.
> 
> Change-Id: Ia3218d371549d7634fe3eda9e8e59b0b0bd8bebb
> Reviewed-on: https://chromium-review.googlesource.com/753885
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49444}

TBR=yangguo@chromium.org,cbruni@chromium.org

Change-Id: I264362552cbc2f8f0c1df84412f4dbeea08ef384
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/776815
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49447}
2017-11-17 13:38:54 +00:00
Camillo Bruni
acfef3ec93 [log] Properly log all maps creating during bootstrapping
Logger::LogMaps will print all maps currently present on the heap.

Note that currently this does not properly log the detailed transitions
for these maps.

Change-Id: Ia3218d371549d7634fe3eda9e8e59b0b0bd8bebb
Reviewed-on: https://chromium-review.googlesource.com/753885
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49444}
2017-11-17 12:55:51 +00:00
Camillo Bruni
e634740bf9 [log] Support --log-function-events in the parser
This partially retires --trace-parse and --trace-preparse which will be fully removed in
a later CL.

Drive-by-fix: make the Parser constructor arguments order more
consistent.

Bug: chromium:757467
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I80a688ce553adfa65ad346718604bd53a9e606a9
Reviewed-on: https://chromium-review.googlesource.com/744046
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49350}
2017-11-14 10:36:58 +00:00
Camillo Bruni
949734f73a [log] Support logging basic function events
This CL contains the base implementation for logging function events.
Currently only compiler events are support (compile, compile-lazy...),
future CLs will enable log events for parsing and first-time exeuction
of functions.

Bug: chromium:757467
Change-Id: Ia705979190a3ebc1009989610483a7a141bc504b
Reviewed-on: https://chromium-review.googlesource.com/743921
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49040}
2017-10-30 15:58:48 +00:00
Camillo Bruni
574d51d5b4 [cctest] Adding console.timeXX log test
Test that console.time/End/Stamp properly show up in the log file.

Change-Id: I99904e20fc98811ed3e3b5e5a9d186b459b8d4be
Reviewed-on: https://chromium-review.googlesource.com/743020
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49035}
2017-10-30 12:48:10 +00:00
Camillo Bruni
c3ad1e9067 [log] Use log for --trace-maps
This is an intermediate CL to move the complete --trace-map infrastructure to
a log-based version.

Change-Id: I0673052b1b87fe338e38dc609434a52af6a0652d
Reviewed-on: https://chromium-review.googlesource.com/738835
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48988}
2017-10-27 03:33:49 +00:00
Camillo Bruni
d06cb58685 [log] Consistently escape log entries
Implicitly escape all output that is passed to Log::MessageBuilder.
We escape non-printable characters and the log field separator ','
using the \x00 and \u0000 escape sequences.

Example:
Before: event-foo,"space: ","comma: ,","double quotes: """
After:  event-foo,space: ,comma: \x2C,double quotes: "

This might slightly impact human readability of the log files in
extreme cases. However, most strings do not contain any escaped
characters.

Bug: 
Change-Id: Ic78f6d9932367d02f9f3c3f70b41b5c283bdf880
Reviewed-on: https://chromium-review.googlesource.com/728332
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48805}
2017-10-20 23:53:44 +00:00
Camillo Bruni
761b4719d3 Reland "[logging] Use OFStream for log events"
This is a reland of 06ff9e974a
Original change's description:
> [logging] Use OFStream for log events
> 
> This simplifies a few operations and removes the size limitations
> implied by the message buffer used.
> 
> Change-Id: I8b873a0ffa399a037ff5c2501ba4b68158810968
> Reviewed-on: https://chromium-review.googlesource.com/724285
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#48766}

Change-Id: Iafda1c88d9180d188d6b8bd7d03d6d27100538d8
Reviewed-on: https://chromium-review.googlesource.com/731107
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48804}
2017-10-20 22:47:01 +00:00
Clemens Hammacher
5f6510825a [cleanup] Fix remaining (D)CHECK macro usages
This CL fixes all occurences that don't require special OWNER reviews,
or can be reviewed by Michi.

After this one, we should be able to reenable the readability/check
cpplint check.

R=mstarzinger@chromium.org

Bug: v8:6837, v8:6921
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng;master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: Ic81d68d5534eaa795b7197fed5c41ed158361d62
Reviewed-on: https://chromium-review.googlesource.com/721120
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48670}
2017-10-18 10:12:31 +00:00
Mathias Bynens
62f929ff4c Use nullptr instead of NULL where possible
New code should use nullptr instead of NULL.

This patch updates existing use of NULL to nullptr where applicable,
making the code base more consistent.

BUG=v8:6928,v8:6921

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng;master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I4687f5b96fcfd88b41fa970a2b937b4f6538777c
Reviewed-on: https://chromium-review.googlesource.com/718338
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48557}
2017-10-13 17:21:49 +00:00
Camillo Bruni
08dba83aa4 [d8] Support more console functions
- console.assert now fails properly
- console.trace dumps a low-level stack trace
- console.time/End dumps a timer event to the log file
- console.timeStamp dumps a timer event to the log

Drive-by-fixes:
- simplify test-log.cc
- fix test-log.cc log parser JS helper
- always start the default timer int the logger

Change-Id: I0bb26b9410a4e0d1d5bc8621d8b2243922fe3f29
Reviewed-on: https://chromium-review.googlesource.com/702459
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48531}
2017-10-13 10:44:17 +00:00
Mateusz Czeladka
fe598532ec Pass Isolate pointer to String::Utf8Value/Value constructors
As part of J2V8 development (https://github.com/eclipsesource/J2V8),
we realized that we had a subtle bug in how Isolate scope was created
and it's lifetime managed, see:
https://github.com/eclipsesource/J2V8/issues/313.

Mentioned above bug was fixed, however, what we also noticed is that
V8 API has been constantly and slowly moving to such an API, in which
one has to pass Isolate explicitly to methods and/or constructors. We
found two more places that might have been overlooked. This contribution
adds passing of Isolate pointer explicitly to constructors of
String::Utf8Value and String::Value classes.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng;master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I61984285f152aba5ca922100cf3df913a9cb2cea
Reviewed-on: https://chromium-review.googlesource.com/593309
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47656}
2017-08-28 18:17:08 +00:00
Jaroslav Sevcik
4229ca207e [profiler] Fix logging addresses on Windows.
Change-Id: Iff0dcec95d04b85d31a452fed31b1500ad17a9f0
Reviewed-on: https://chromium-review.googlesource.com/591373
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46976}
2017-07-28 14:36:14 +00:00
jarin
12d815b36e [profiler] Web UI: add summary of opts/deopts.
This adds optimization and deoptimization counts to the Web UI. Also, the function timeline
now shows optimization and deoptimization marks.

Review-Url: https://codereview.chromium.org/2753543006
Cr-Commit-Position: refs/heads/master@{#44033}
2017-03-22 16:02:25 +00:00
marja
9c7b87269c include fixing: api.h shouldn't include objects-inl.h
Downside: this adds all kinds of weird includes in the .cc files.

(See design doc linked in the bug.)

BUG=v8:5402

Review-Url: https://codereview.chromium.org/2622503002
Cr-Commit-Position: refs/heads/master@{#42140}
2017-01-09 13:43:28 +00:00
ulan
1b26611ce9 [heap] Introduce enum of garbage collection reasons.
Now callers of Heap::CollectGarbage* functions need to
specify the reason as an enum value instead of a string.

Subsequent CL will add stats counter for GC reason.

BUG=

Review-Url: https://codereview.chromium.org/2310143002
Cr-Commit-Position: refs/heads/master@{#39239}
2016-09-07 10:03:08 +00:00
marja
8e7241fdde Include only stuff you need, part 6: Fix cctest.h.
Rebuilding (after touching certain files) is crazy slow because
includes are out of control. Many of these files we need to rebuild are
cctests which pull in more includes than they need.

BUG=v8:5294

Review-Url: https://codereview.chromium.org/2304553002
Cr-Commit-Position: refs/heads/master@{#39080}
2016-09-01 12:02:16 +00:00
machenbach
72f7d9a294 Revert of [heap] Do not invoke GC to make heap iterable. (patchset #3 id:40001 of https://codereview.chromium.org/1992913004/ )
Reason for revert:
[Sheriff] Speculative revert for some flakes on the waterfall:
https://build.chromium.org/p/client.v8/builders/V8%20Mac%20-%20debug/builds/7409
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20-%20avx2/builds/7983
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20-%20internal%20snapshot/builds/4901

Original issue's description:
> [heap] Do not invoke GC to make heap iterable.
>
> This reverts commit 0aa3707dc4.
>
> And removes the UnreachableObjectsFilter.
>
> BUG=chromium:580959
> LOG=n
>
> Committed: https://crrev.com/132f89800f560190b4d655adcb4e0eeedd17fd82
> Cr-Commit-Position: refs/heads/master@{#36617}

TBR=yangguo@chromium.org,ulan@chromium.org,hpayer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:580959

Review-Url: https://codereview.chromium.org/2020363002
Cr-Commit-Position: refs/heads/master@{#36622}
2016-05-31 17:43:15 +00:00
hpayer
132f89800f [heap] Do not invoke GC to make heap iterable.
This reverts commit 0aa3707dc4.

And removes the UnreachableObjectsFilter.

BUG=chromium:580959
LOG=n

Review-Url: https://codereview.chromium.org/1992913004
Cr-Commit-Position: refs/heads/master@{#36617}
2016-05-31 14:50:39 +00:00
machenbach
a23222ed32 [build] Fix a clang warning
For cross-compiler-compatibility and standards compliance %p
requires a void*, rather than any pointer type.

BUG=chromium:474921

Review-Url: https://codereview.chromium.org/2001073002
Cr-Commit-Position: refs/heads/master@{#36466}
2016-05-24 10:47:24 +00:00
machenbach
0aa3707dc4 Revert of [heap] Do not invoke GC to make heap iterable. (patchset #5 id:80001 of https://codereview.chromium.org/1961373003/ )
Reason for revert:
Breaks https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20gc%20stress/builds/3551

Original issue's description:
> [heap] Do not invoke GC to make heap iterable.
>
> Remove kMakeHeapIterableMask since the heap is always iterable.
>
> BUG=chromium:580959
> LOG=n
>
> Committed: https://crrev.com/7c1cac4888a248fda3fa6de3624f32a6babb37e9
> Cr-Commit-Position: refs/heads/master@{#36333}

TBR=ulan@chromium.org,yangguo@chromium.org,hpayer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:580959

Review-Url: https://codereview.chromium.org/1987363002
Cr-Commit-Position: refs/heads/master@{#36335}
2016-05-18 19:23:07 +00:00
hpayer
7c1cac4888 [heap] Do not invoke GC to make heap iterable.
Remove kMakeHeapIterableMask since the heap is always iterable.

BUG=chromium:580959
LOG=n

Review-Url: https://codereview.chromium.org/1961373003
Cr-Commit-Position: refs/heads/master@{#36333}
2016-05-18 18:03:48 +00:00
jfb
9041833647 Fix printf formats
The usage of __attribute__((format(x, y)) was either wrong or missing from multiple functions, leading to erroneous formats. This CL:

 - Imports PRINTF_FORMAT macro from Chrome's src/base/compiler-specific.h.
 - Uses it appropriately.
 - Imports Chrome's base/format_macros.h mainly to fix size_t formats (further cleanup could be done).
 - Fixes a bunch of incorrect formats.

Original CL: https://codereview.chromium.org/1869433004
Reverted in: https://codereview.chromium.org/1867383002
Reverted again in: https://codereview.chromium.org/1877823003

Reverts due to non-CQ bots:
  - First: v8_win_dbg, v8_win64_dbg, v8_mac_dbg
  - Second: gc mole (added to v8_linux_rel_ng for this patch)

R= jochen@chromium.org
TBR= ahaas@chromium.org,bmeurer@chromium.org,yangguo@chromium.org

Review URL: https://codereview.chromium.org/1872203005

Cr-Commit-Position: refs/heads/master@{#35423}
2016-04-12 16:14:03 +00:00
machenbach
df826bf50f Revert of Fix printf formats (patchset #4 id:60001 of https://codereview.chromium.org/1877453002/ )
Reason for revert:
Breaks gc mole:
https://build.chromium.org/p/client.v8/builders/V8%20Linux/builds/9421

Original issue's description:
> Fix printf formats
>
> The usage of __attribute__((format(x, y)) was either wrong or missing from multiple functions, leading to erroneous formats. This CL:
>
>  - Imports PRINTF_FORMAT macro from Chrome's src/base/compiler-specific.h.
>  - Uses it appropriately.
>  - Imports Chrome's base/format_macros.h mainly to fix size_t formats (further cleanup could be done).
>  - Fixes a bunch of incorrect formats.
>
> Original CL: https://codereview.chromium.org/1869433004
> Reverted in: https://codereview.chromium.org/1867383002
>
> R= jochen@chromium.org
> TBR= bmeurer@chromium.org, yangguo@chromium.org, ahaas@chromium.org
>
> Committed: https://crrev.com/bf505329288e1b75bab0e6800371a9aac40fa5cc
> Cr-Commit-Position: refs/heads/master@{#35394}

TBR=jochen@chromium.org,ahaas@chromium.org,bmeurer@chromium.org,yangguo@chromium.org,jfb@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1877823003

Cr-Commit-Position: refs/heads/master@{#35396}
2016-04-11 17:30:18 +00:00
jfb
bf50532928 Fix printf formats
The usage of __attribute__((format(x, y)) was either wrong or missing from multiple functions, leading to erroneous formats. This CL:

 - Imports PRINTF_FORMAT macro from Chrome's src/base/compiler-specific.h.
 - Uses it appropriately.
 - Imports Chrome's base/format_macros.h mainly to fix size_t formats (further cleanup could be done).
 - Fixes a bunch of incorrect formats.

Original CL: https://codereview.chromium.org/1869433004
Reverted in: https://codereview.chromium.org/1867383002

R= jochen@chromium.org
TBR= bmeurer@chromium.org, yangguo@chromium.org, ahaas@chromium.org

Review URL: https://codereview.chromium.org/1877453002

Cr-Commit-Position: refs/heads/master@{#35394}
2016-04-11 16:27:54 +00:00
jfb
4c4fdc2d63 Revert of Fix printf formats (patchset #8 id:140001 of https://codereview.chromium.org/1869433004/ )
Reason for revert:
One small issue easily fixed here: https://codereview.chromium.org/1867333003/

But it looks like MSVS 2013 doesn't like some of the formats and exists with the unhelpful:
Stderr:
f:\dd\vctools\crt\crtw32\stdio\output.c(1125) : Assertion failed: ("Incorrect
format specifier", 0)

It's easier to revert for now, I'll dig more into the docs:
https://msdn.microsoft.com/en-us/library/56e442dc(v=vs.120).aspx
https://msdn.microsoft.com/en-us/library/tcxf1dw6(v=vs.120).aspx

And then resubmit, making sure I run these bots.

Original issue's description:
> Fix printf formats
>
> The usage of __attribute__((format(x, y)) was either wrong or missing from multiple functions, leading to erroneous formats. This CL:
>
>  - Imports PRINTF_FORMAT macro from Chrome's src/base/compiler-specific.h.
>  - Uses it appropriately.
>  - Imports Chrome's base/format_macros.h mainly to fix size_t formats (further cleanup could be done).
>  - Fixes a bunch of incorrect formats.
>
> R= jochen@chromium.org, bmeurer@chromium.org, yangguo@chromium.org, ahaas@chromium.org
>
> Committed: https://crrev.com/6ebf9fbb93d31f9be41156a3325d58704ed4933d
> Cr-Commit-Position: refs/heads/master@{#35365}

TBR=jochen@chromium.org,bmeurer@chromium.org,yangguo@chromium.org,ahaas@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1867383002

Cr-Commit-Position: refs/heads/master@{#35366}
2016-04-08 18:05:12 +00:00
jfb
6ebf9fbb93 Fix printf formats
The usage of __attribute__((format(x, y)) was either wrong or missing from multiple functions, leading to erroneous formats. This CL:

 - Imports PRINTF_FORMAT macro from Chrome's src/base/compiler-specific.h.
 - Uses it appropriately.
 - Imports Chrome's base/format_macros.h mainly to fix size_t formats (further cleanup could be done).
 - Fixes a bunch of incorrect formats.

R= jochen@chromium.org, bmeurer@chromium.org, yangguo@chromium.org, ahaas@chromium.org

Review URL: https://codereview.chromium.org/1869433004

Cr-Commit-Position: refs/heads/master@{#35365}
2016-04-08 15:31:15 +00:00
mbrandy
9f8c21164c Additional fixes for external callback logging in profiler.
For platforms that use function descriptors (currently AIX and
PPC64BE), log an external callback's entrypoint address rather than
its function descriptor address.

R=jkummerow@chromium.org, michael_dawson@ca.ibm.com
TEST=cctest/test-cpu-profiler/JsNativeJsSample
BUG=

Review URL: https://codereview.chromium.org/1752173003

Cr-Commit-Position: refs/heads/master@{#34505}
2016-03-04 18:57:30 +00:00
rmcilroy
cb29f9cdbc [Interpreter] Add support for cpu profiler logging.
Adds support for cpu profiler logging to the interpreter. Modifies the
the API to be passed AbstractCode objects instead of Code objects, and
adds extra functions to AbstractCode which is required by log.cc and
cpu-profiler.cc.

The main change in sampler.cc is to determine if a stack frame is an
interpreter stack frame, and if so, use the bytecode address as the pc
for that frame. This allows sampling of bytecode functions. This
requires adding support to SafeStackIterator to determine if a frame is
interpreted, which we do by checking the PC against pre-stored addresses
for the start and end of interpreter entry builtins.

Also removes CodeDeleteEvents which are dead code and haven't
been reported for some time.

Still to do is tracking source positions which will be done in a
followup CL.

BUG=v8:4766
LOG=N

Review URL: https://codereview.chromium.org/1728593002

Cr-Commit-Position: refs/heads/master@{#34321}
2016-02-26 11:04:55 +00:00
jochen
6f472db65a Disable soon to be deprecated APIs per default for v8
Embedders still can use those APIs by default

test-api.cc still has an exception to use the old APIs...

BUG=v8:4143
R=vogelheim@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1505803004

Cr-Commit-Position: refs/heads/master@{#32701}
2015-12-09 10:35:04 +00:00
jochen
3e882ff1ea Remove deprecated APIs from two more tests
BUG=4134
R=epertoso@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1455603002

Cr-Commit-Position: refs/heads/master@{#32072}
2015-11-18 08:22:30 +00:00
ofrobots
010897c16a Reland improve perf_basic_prof filename reporting
Using perf-basic-prof in the test-case was problematic on windows. Use
CodeEventLogger directly.

Previous issue: https://codereview.chromium.org/1396843004/

R=jkummerow@chromium.org,yangguo@chromium.org,yurys@chromium.org
BUG=chromium:539892
LOG=N

Committed: https://crrev.com/701ba0b255f9c34f4b8c43584ef1e35040474e7d
Cr-Commit-Position: refs/heads/master@{#31197}

patch from issue 1396843004 at patchset 60001 (http://crrev.com/1396843004#ps60001)

Review URL: https://codereview.chromium.org/1403763002

Cr-Commit-Position: refs/heads/master@{#31237}
2015-10-13 12:45:31 +00:00
ofrobots
30b57dcd42 Revert of improve perf_basic_prof filename reporting (patchset #4 id:60001 of https://codereview.chromium.org/1396843004/ )
Reason for revert:
The test-case has issues on windows. http://build.chromium.org/p/client.v8/builders/V8%20Win32%20-%20debug%20-%203/builds/5011/steps/Check/logs/stdio

Original issue's description:
> improve perf_basic_prof filename reporting
>
> Re-implement https://codereview.chromium.org/1388543002 after fixing the issue
> with SNPrintF crashing on windows when a zero-length buffer is passed in.
>
> R=jkummerow@chromium.org,yangguo@chromium.org,yurys@chromium.org
> BUG=chromium:539892
> LOG=N
>
> Committed: https://crrev.com/701ba0b255f9c34f4b8c43584ef1e35040474e7d
> Cr-Commit-Position: refs/heads/master@{#31197}

TBR=jkummerow@chromium.org,yangguo@chromium.org,yurys@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:539892

Review URL: https://codereview.chromium.org/1400813003

Cr-Commit-Position: refs/heads/master@{#31198}
2015-10-09 18:28:21 +00:00
ofrobots
701ba0b255 improve perf_basic_prof filename reporting
Re-implement https://codereview.chromium.org/1388543002 after fixing the issue
with SNPrintF crashing on windows when a zero-length buffer is passed in.

R=jkummerow@chromium.org,yangguo@chromium.org,yurys@chromium.org
BUG=chromium:539892
LOG=N

Review URL: https://codereview.chromium.org/1396843004

Cr-Commit-Position: refs/heads/master@{#31197}
2015-10-09 17:17:40 +00:00
alph
e0606c9f00 Move heap and CPU profilers into a dedicated directory.
Drive-by: remove unnecessary includes.

Review URL: https://codereview.chromium.org/1356223004

Cr-Commit-Position: refs/heads/master@{#30987}
2015-09-28 19:34:18 +00:00
hablich
6eb837697a Revert of [heap] More flag cleanup. (patchset #8 id:140001 of https://codereview.chromium.org/1314863003/ )
Reason for revert:
Breaks http://build.chromium.org/p/client.v8/builders/V8%20Arm%20-%20debug%20-%202/builds/2372

Original issue's description:
> [heap] GC flag cleanup/restructuring.
>
> * GC's flags are now proper flags and not int.
> * Callback flags are not threaded through but only set once like gc flags
> * Callers of methods that trigger GCs need to pass a reason when not using
>   the default parameters.
>
> Furthermore, each GC invocation can be passed the GC and GCCallback flags. We
> usually override the currently set flags upon finishing a GC cylce, but are able
> to restore the previously set if desired. This is useful for explicitely
> triggered scavenges or external requests that interrupt the current behaviour.
>
> BUG=
>
> Committed: https://crrev.com/f4f3b431b9ce0778d926acf03c0d36dae5c0cba4
> Cr-Commit-Position: refs/heads/master@{#30457}

TBR=hpayer@chromium.org,yangguo@chromium.org,mlippautz@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1303393004

Cr-Commit-Position: refs/heads/master@{#30463}
2015-08-31 10:23:35 +00:00
mlippautz
f4f3b431b9 [heap] GC flag cleanup/restructuring.
* GC's flags are now proper flags and not int.
* Callback flags are not threaded through but only set once like gc flags
* Callers of methods that trigger GCs need to pass a reason when not using
  the default parameters.

Furthermore, each GC invocation can be passed the GC and GCCallback flags. We
usually override the currently set flags upon finishing a GC cylce, but are able
to restore the previously set if desired. This is useful for explicitely
triggered scavenges or external requests that interrupt the current behaviour.

BUG=

Review URL: https://codereview.chromium.org/1314863003

Cr-Commit-Position: refs/heads/master@{#30457}
2015-08-31 07:58:54 +00:00
jochen
5df3b4ab5c Update all callsites of the TryCatch ctor to pass an Isolate
BUG=4134
R=vogelheim@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1154423004

Cr-Commit-Position: refs/heads/master@{#28678}
2015-05-28 12:49:41 +00:00
alph
6964a9e068 Make CPU profiler do not hog 100% of CPU.
Tick event processor should not stay in a tight loop
when there's nothing to do. It can go sleep until next sample event.

LOG=N
BUG=v8:3967

Review URL: https://codereview.chromium.org/1118533003

Cr-Commit-Position: refs/heads/master@{#28211}
2015-05-04 22:53:28 +00:00
jochen
9ba5fe028f Pass ArrayBuffer::Allocator via Isolate::CreateParams
We shouldn't have shared state between isolates by default. The embedder
is free to pass the same allocator to all isolates it creates.

BUG=none
R=dcarney@chromium.org
LOG=y

Review URL: https://codereview.chromium.org/1116633002

Cr-Commit-Position: refs/heads/master@{#28127}
2015-04-29 09:54:43 +00:00
yangguo
019096f829 Serializer: move to a subfolder and clean up includes.
R=jochen@chromium.org

Review URL: https://codereview.chromium.org/1041743002

Cr-Commit-Position: refs/heads/master@{#27501}
2015-03-27 15:29:07 +00:00
bmeurer
c65ae4f10c Reland "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.".
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/877753007

Cr-Commit-Position: refs/heads/master@{#26346}
2015-01-30 09:29:41 +00:00
Benedikt Meurer
883852293a Revert "Make GCC happy again." and "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.".
This reverts commit 6a4c0a3bae and commit
0deaa4b629 for breaking GCC bots.

TBR=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/893533003

Cr-Commit-Position: refs/heads/master@{#26342}
2015-01-30 07:19:57 +00:00