Commit Graph

8 Commits

Author SHA1 Message Date
Zachary Anderson a1bcf051d8 clang-format runtime/vm
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Zachary Anderson 103881d01c Make header include guards great again
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 .
2016-10-26 00:26:03 -07:00
Todd Turnidge 424ca27a15 Fix various nefarious problems with the script table used in source reports.
Before we could get duplicate or spurious script table entries.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2038203002 .
2016-06-06 11:22:46 -07:00
John McCutchan ffbd0b763a Add profile data to getSourceReport
- 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 .
2016-03-14 07:04:23 -07:00
John McCutchan d77d376124 Replace intptr_t with TokenDescriptor
- 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 .
2016-02-02 10:15:44 -08:00
Todd Turnidge 539ac23fb4 Add PossibleBreakpoints source reporting.
This allows tools developers to discover which token positions
correspond to possible breakpoints in the code.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1586253002 .
2016-01-15 09:02:38 -08:00
Todd Turnidge 61d9752c7e Expose the new _getSourceReport api in the service protocol.
Allow multiple reports to be requested simultaneously.

I'm not exposing this publicly yet -- still nailing down the format a bit.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1566793002 .
2016-01-06 13:01:33 -08:00
Todd Turnidge 26af34a1b3 Add SourceReport, a class for generating Dart source-level reports.
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 .
2016-01-04 10:56:52 -08:00