commit | 60183d0dc4f34e207dd8eec1f3961d706ba5a9c6 | [log] [tgz] |
---|---|---|
author | Jens Johansen <jensj@google.com> | Fri Feb 10 08:29:37 2023 +0000 |
committer | Commit Queue <dart-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Feb 10 08:29:37 2023 +0000 |
tree | 9ea7a4418ecec76f4f17b0d5d760901f8082f95f | |
parent | e6e1040afcb9662315d333336378e4a9ce3bf030 [diff] |
[ddc/testing/cfe/kernel] Wire up leak testing in ddc batch testing; fix 'semi-leaks' There's been some talks about weird failures on DDC and there was ideas that this was caused by some sort of leak (of kernel libraries). I haven't really found any "meaningful" leaks that should be able to cause that. What I have found is this: * a temporary leak where the vm seemingly gets "one behind". That's fixed here by creating a class for the ddc batch compiler, having things in field variables etc. It shouldn't influence results. * a leaks via https://github.com/dart-lang/sdk/issues/51317 --- but that's just wasted memory, I can't see how that should influence results. * a leak via kernels dummy nodes --- again it shouldn't influence results (unless we're leaving dummy nodes in the output somewhere --- which, considering I'm removing that in my test by null'ing out the parent pointer and stuff still working I'm guessing we're not). * another leak via some ports map after a crash, but that seems to go away on its own (the VM cleaning it up later than I think it should?). Again it shouldn't influence anything other than (temporary) wasted space. I've wired up the leak testing stuff into the DDC batch mode so that one can go into "leak test mode" by doing `export DDC_LEAK_TEST="true"` on the terminal (I think `set DDC_LEAK_TEST="true"` on Windows). Then one could run test.py, say ``` python3 tools/test.py -t10000 -c dartdevk --nnbd weak -m release \ -r none --enable-asserts --no-use-sdk -j 1 co19/LanguageFeatures/ ``` and attach the leak tester via ``` out/ReleaseX64/dart \ pkg/front_end/test/vm_service_for_leak_detection.dart --dart-leak-test ``` Currently this finds - if I recall correctly - 3 leaks (I think all via the ports map stuff), but it all goes away again on it's own, so likely another case of the VM somehow getting "one behind". Change-Id: Idbf057e3aedfe7b256370f90ddf72f1f8e6798a8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282027 Commit-Queue: Jens Johansen <jensj@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com> Reviewed-by: Nicholas Shahan <nshahan@google.com>
Dart is:
Optimized for UI: Develop with a programming language specialized around the needs of user interface creation.
Productive: Make changes iteratively: use hot reload to see the result instantly in your running app.
Fast on all platforms: Compile to ARM & x64 machine code for mobile, desktop, and backend. Or compile to JavaScript for the web.
Dart's flexible compiler technology lets you run Dart code in different ways, depending on your target platform and goals:
Dart Native: For programs targeting devices (mobile, desktop, server, and more), Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an AOT (ahead-of-time) compiler for producing machine code.
Dart Web: For programs targeting the web, Dart Web includes both a development time compiler (dartdevc) and a production time compiler (dart2js).
Dart is free and open source.
See LICENSE and PATENT_GRANT.
Visit dart.dev to learn more about the language, tools, and to find codelabs.
Browse pub.dev for more packages and libraries contributed by the community and the Dart team.
Our API reference documentation is published at api.dart.dev, based on the stable release. (We also publish docs from our beta and dev channels, as well as from the primary development branch).
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents on our wiki.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.