Tess Strickland
6c8f4aa190
Reland "[vm] Fix V8 snapshot profile handling of the dispatch table."
...
This is a reland of 5909fd111d
Does a large refactoring on the V8 snapshot profile writer
to clean things up, add more debugging support, and to fix
the problems that surfaced during the original landing.
Other changes:
Changes Serializer::CreateArtificialNodeIfNeeded() to create
artificial nodes for Code objects and immutable arrays.
Fixes CodeSerializationCluster::Trace() to only push needed parts of
discarded code objects, instead of tracing them like full code objects.
Adds test cases to v8_snapshot_profile_writer_test that exercise
the following situations (both separately and together):
* Non-symbolic stack traces are enabled and code and function objects
are dropped when not needed at runtime.
* Creation of the dispatch table is disabled.
TEST=vm/dart{,_2}/v8_snapshot_profile_writer_test
Original change's description:
> [vm] Fix V8 snapshot profile handling of the dispatch table.
>
> Fixes https://github.com/dart-lang/sdk/issues/45702 .
>
> TEST=Tests listed in the issue above.
>
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try
> Change-Id: Ibf5e3ccf3828c01f9dda47de360314dabe8cb8a9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195272
> Reviewed-by: Daco Harkes <dacoharkes@google.com >
> Commit-Queue: Tess Strickland <sstrickl@google.com >
Change-Id: I8e7030267fe190079a8f68d00fe20bf7170e5719
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-obfuscate-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195513
Reviewed-by: Daco Harkes <dacoharkes@google.com >
Commit-Queue: Tess Strickland <sstrickl@google.com >
2021-04-20 11:17:36 +00:00
Tess Strickland
5fc2ba5fc4
[platform] Adjust Utils::StringHash() for misaligned starts.
...
Fixes https://github.com/dart-lang/sdk/issues/45290
TEST=vm/cc/StringHash
Cq-Include-Trybots: luci.dart.try:vm-kernel-ubsan-linux-release-x64-try,vm-kernel-precomp-ubsan-linux-release-x64-try
Change-Id: I7c1ef59cece77c6c9b705116e956e945bfcb55d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190882
Commit-Queue: Tess Strickland <sstrickl@google.com >
Reviewed-by: Liam Appelbe <liama@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2021-03-18 17:42:53 +00:00
Ryan Macnak
b9c86f07dc
[vm] Produce clearer error messages for malloc/realloc failures.
...
TEST=bots
Bug: https://github.com/dart-lang/sdk/issues/43642
Change-Id: I7bc2b3b5231413967f9b1f608c957326ff6c6aaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171680
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Alexander Aprelev <aam@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2020-11-13 22:10:54 +00:00
Ryan Macnak
40d876382a
[vm] Fix various UBSan failures: AOT.
...
Bug: https://github.com/dart-lang/sdk/issues/39427
Change-Id: I2594e28a277f1d9f838aa93d546714d4f300b5b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147682
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2020-05-12 20:28:11 +00:00
Ben Konyi
6548694a82
Reland "[ VM / DartDev ] Added support for format and pub commands via standalone VM"
...
Fixes a malloc/delete[] mismatch.
This reverts commit b3396cbdca .
Change-Id: I18fe142bc60bedd8af4c588ba4039742e1d34606
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134570
Reviewed-by: Liam Appelbe <liama@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
2020-02-06 00:04:09 +00:00
Aart Bik
c38e19cbbe
[vm/compiler] bit utilities
...
Rationale:
Useful in the future when compiler wants to constant fold
operations related to leading/trailing/counting (non)zeros.
https://github.com/dart-lang/sdk/issues/38346
Change-Id: I158aca125d3a15019af20ca7c2a516b74e4d84c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119920
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Aart Bik <ajcbik@google.com >
2019-10-07 18:13:06 +00:00
Aart Bik
7e99f49629
[vm/compiler] general rbit utilities
...
Rationale:
Useful to implement the simulator, but also useful
in the future when compiler wants to constant fold
operations related to bit reversal.
https://github.com/dart-lang/sdk/issues/38346
Change-Id: I2f09ba6b1897202b5c07a2cff771afd7bbc99495
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119703
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Aart Bik <ajcbik@google.com >
2019-10-02 20:37:10 +00:00
Aart Bik
d1c9a2b06f
[vm/compiler] Improve DIV and MOD performance
...
Rationale:
Mostly an AOT 64-bit improvement of DIV and MOV by constant
on X64_64. Also a few minor supporting optimizations
that were missed. With unit tests.
https://github.com/dart-lang/sdk/issues/37789
Change-Id: I2f12d6a24bbe983324521d7d4d778f20b34d18a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114901
Commit-Queue: Aart Bik <ajcbik@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2019-08-29 20:32:10 +00:00
Lorenz Nickel
79e478e50e
Fixed some links
...
**I fixed some links and some other minor flaws.**
I also found the following outdated links, which I didn't fix:
- [This link](https://github.com/dart-lang/pool/tree/zone.strong ) in [this file](https://github.com/dart-lang/sdk/blob/master/docs/newsletter/20170728.md ) (didn't fix because don't know new location and this is some sort of archive so the link should probably stay the original)
- [This link](https://www.dartlang.org/tools/analyzer ) in [this file](https://github.com/dart-lang/sdk/blob/master/pkg/analyzer_cli/lib/src/options.dart ) (didn't fix since the link is still working, it just gets redirected and the link is part of the programm, I don't want to break anything by changing it, all other links are in comments)
- [This link](https://github.com/domokit/mojo/issues/728 ) in [this file](https://github.com/dart-lang/sdk/blob/master/build/config/compiler/BUILD.gn ) (didn't fix since probably has no new location and is part of TODO, which I don't want to change)
While doing all this I also noticed that [these tests](https://github.com/dart-lang/sdk/tree/master/tests/compiler/dart2js_extra ) contain a lot of other inconsistencies in their comments and the location of the import-statements (I only fixed one which was not link-related), could be target of another PR.
Closes #36927
https://github.com/dart-lang/sdk/pull/36927
GitOrigin-RevId: 71d05d0b52d8ec5b92d077a070e066d1fdd4bbfa
Change-Id: Ide4b2424fccad8ae2e06c788efd4443dc0de997b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102222
Reviewed-by: Michael Thomsen <mit@google.com >
Commit-Queue: Michael Thomsen <mit@google.com >
2019-07-01 16:21:41 +00:00
Ryan Macnak
971f4845d7
[build] Remove last platform -> vm and bin -> vm dependencies. Fix some ODR violations.
...
Change some static_libraries to source_sets to make ODR violations link-time errors.
This is needed to enable (stop suppressing) -fvisibility=hidden in Fuchsia product builds.
Change-Id: I699cec8d4b516beab9cebf9db0a522a7ff99e004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99822
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2019-04-22 20:15:43 +00:00
Dan Field
eb73f132c1
[vm] Add macro for fallthrough annotations
...
Internal builds in Google are catching this as an error.
I'm guarding it because I assume we might support building using other
compilers.
Change-Id: I665099cace9c6a40d737c471dd1b0fdb326fea39
Reviewed-on: https://dart-review.googlesource.com/c/91162
Commit-Queue: Siva Annamalai <asiva@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2019-02-15 01:12:01 +00:00
Ryan Macnak
7e54844fe7
[vm] Fix build for gcc 7.3.0.
...
Change-Id: I02ead73679c3a6e1e5c9313f78c5f02ad6ca79b0
Reviewed-on: https://dart-review.googlesource.com/53521
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2018-05-03 17:59:44 +00:00
Ryan Macnak
f60efb7e40
Reapply "[vm] Popcount via compiler intrinsics."
...
Add missing rename of CountOneBits in ARM assembler.
Change-Id: I735da06343248573a1b049109ebc2bf0d1634960
Reviewed-on: https://dart-review.googlesource.com/18504
Reviewed-by: Zach Anderson <zra@google.com >
2017-11-03 17:39:16 +00:00
Ryan Macnak
2761c556ca
Revert "[vm] Popcount via compiler intrinsics."
...
This reverts commit c4f4cdbf29 .
Reason for revert: ARM compile-time errors
Original change's description:
> [vm] Popcount via compiler intrinsics.
>
> Change-Id: I8913beea7b984f04cec7f9efc00673aa12095eda
> Reviewed-on: https://dart-review.googlesource.com/18423
> Reviewed-by: Zach Anderson <zra@google.com >
TBR=rmacnak@google.com ,zra@google.com
Change-Id: I5efe8100e3c1fa404b1c24f369dca5c137acd2b8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/18640
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2017-11-03 16:50:47 +00:00
Ryan Macnak
c4f4cdbf29
[vm] Popcount via compiler intrinsics.
...
Change-Id: I8913beea7b984f04cec7f9efc00673aa12095eda
Reviewed-on: https://dart-review.googlesource.com/18423
Reviewed-by: Zach Anderson <zra@google.com >
2017-11-03 16:34:35 +00:00
Zachary Anderson
6cd8a79078
VM: Re-format to use at most one newline between functions
...
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Zachary Anderson
6953586716
Add .clang-format and run clang-format on runtime/platform.
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2470663006 .
2016-11-03 14:25:16 -07:00
koda@google.com
cdafe57cac
During promotion, use bump allocation whenever there are no small blocks available.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//534653002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39893 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 01:07:57 +00:00
iposva@google.com
28c8553cb6
- Fix a lot of warnings generated by -Wshorten-64-to-32
...
when compiling for ia32 on Mac.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//415513002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38499 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 14:10:13 +00:00
regis@google.com
f58908bfdd
Tweaks for speed in integer arithmetic runtime.
...
Unrelated:
Removed annoying svn property on utils.cc (indicated by MM):
svn propdel svn:eol-style runtime/platform/utils.cc
R=srdjan@google.com
Review URL: https://codereview.chromium.org//381543002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38090 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-09 17:16:10 +00:00
iposva@google.com
f2a6f1b4b6
Another round of cleanups for http://www.dartbug.com/15922
...
- Address warnings about 64-bit to 32-bit conversions.
R=ajohnsen@google.com , asiva@google.com
Review URL: https://codereview.chromium.org//169893003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32831 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 23:35:55 +00:00
kmillikin@google.com
c70bcfcfa3
Support constant folding of instructions with constant smi values.
...
In sparse conditional constant propagation, replace instructions with
constant smi values with their constant value. Extend the analysis to
understant shift and bitwise binary operations.
R=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//10968058
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12778 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 13:14:54 +00:00
sgjesse@google.com
c1d041500f
Use hash map for event handler file descriptor map
...
Instead of using an array indexed using the file descriptor for
looking up data associated with a socket (SocketData objects) this is
now stored in a hash map using the file descriptor as key.
Added hash map implementation like the one used in the V8 project.
R=ager@google.com , whesse@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9186035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3483 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-23 09:10:51 +00:00
sgjesse@google.com
65896148c9
Move utils.h and utils.cc from runtime/vm to runtime/platform
...
Moved additional parts of globals.h from vm/ to platform/ to support
types and constants used by utils.*.
R=ager@google.com , iposva@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//9209001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3337 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-16 13:23:40 +00:00