When using a concatenated dill file, several scripts with the same URL
can exist. They are not the same though, and should not be treated as
such.
Bug: #34841
Change-Id: Icd46357ffcf72ed35251b2a2793e1f83c02c4a8e
Reviewed-on: https://dart-review.googlesource.com/c/80821
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
i.e. #ifndef VM_WHATEVER -> #ifndef RUNTIME_VM_WHATEVER
This lets us remove a hack from the PRESUBMIT.py script that existed
for reasons that are no longer valid, and sets us up to add some
presubmit checks for the GN build.
R=asiva@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/2450713004 .
- Add new getSourceReport kind 'Profile'.
- Add "profileTicks" to source ranges that have profile data.
- "profileTicks" is organized as three arrays: positions, inclusive ticks, and exclusive ticks. These arrays are indexed together.
- Keep source positions in profile sorted by token position value.
- Misc improvements to debug printing in profiler.
- Add unit test for profile getSourceReport.
R=turnidge@google.com
Review URL: https://codereview.chromium.org/1779333004 .
- Use TokenDescriptor instead of intptr_t for all token positions.
- Use TokenDescriptor in raw_object instead of int32_t.
- TokenDescriptor is a POD with an int32_t (this shrinks the size of AST and IR nodes by 32-bits on 64-bit architectures).
There are some cleanups I plan on doing as a follow up CL:
- Replace TokenDescriptor::value() with TokenDescriptor::TokenPos()
R=iposva@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/1644793002 .
These reports provide information tied to token positions in the
Dart source program.
SourceReport can generate multiple kinds of reports. Right now it
implements code coverage and call site reports. In the future it
could provide, for example, valid breakpoint sites or source-level
profiles.
Scripts are refered to by index within the report and a script table
is tacked on the end. This avoids a bit of duplication.
In a future cl I will expose this reporting through the vm service.
After that, we can remove our older coverage/callsite code.
----------
Very simple, sample coverage report:
{
"type": "SourceReport",
"ranges": [
{
"scriptIndex": 0,
"startPos": 0,
"endPos": 4,
"compiled": true,
"coverage": {
"hits": [],
"misses": []
}
},
{
"scriptIndex": 0,
"startPos": 6,
"endPos": 10,
"compiled": false
},
{
"scriptIndex": 0,
"startPos": 12,
"endPos": 39,
"compiled": true,
"coverage": {
"hits": [ 23 ],
"misses": [ 32 ]
}
}
],
"scripts": [
{
"type": "@Script",
"fixedId": true,
"id": "libraries\/15\/scripts\/test-lib",
"uri": "test-lib",
"_kind": "script"
}
]
}
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1533653003 .