Commit Graph

73 Commits

Author SHA1 Message Date
Matthias Hausner 408a64756e Fix setting breakpoint setting in await statements
CL https://codereview.chromium.org/2626753002 introduced a “real” token
position for the synthetic code that re-throws an exception returned
by an await’ed expression. This interferes with setting a breakpoint
in a line that contains an await, since the synthetic code happens to
be at the lowest compiled code address and will thus be picked as the
breakpoint location.

This CL makes the re-throw a synthetic token position again, but
includes synthetic token positions in stack traces. This is an alternative
fix for bug #28325.

BUG=#28770
R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2727803002 .
2017-03-02 12:21:42 -08:00
Ben Konyi 68a102cab2 Fixed tests not having MallocHooks initialized for tests in release mode.
Revert "Revert "Fixed issue in MallocHooks where a MallocHookScope was accidentally removed during a merge, causing a deadlock in the hooks. Also turned off stack trace collection in a test that was timing out as a result of the stack trace collection.""

This reverts commit 1a5b555aa9.

BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2711353003 .
2017-02-24 13:56:06 -08:00
Ben Konyi 1a5b555aa9 Revert "Fixed issue in MallocHooks where a MallocHookScope was accidentally removed during a merge, causing a deadlock in the hooks. Also turned off stack trace collection in a test that was timing out as a result of the stack trace collection."
This reverts commit 44a9a4ede3.

BUG=

Review-Url: https://codereview.chromium.org/2714083002 .
2017-02-23 19:21:00 -08:00
Ben Konyi 44a9a4ede3 Fixed issue in MallocHooks where a MallocHookScope was accidentally removed during a merge, causing a deadlock in the hooks. Also turned off stack trace collection in a test that was timing out as a result of the stack trace collection.
Updated MallocHooks to collect stack traces when memory is allocated.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2718523003 .
2017-02-23 18:58:50 -08:00
Ben Konyi d4f026c2e0 Revert "Updated MallocHooks to collect stack traces when memory is allocated."
This reverts commit a486a8a26b51dce728373183ab02aeda70e6f2d0.

R=johnmccutchan@google.com
TBR=johnmccutchan@google.com
BUG=

Review-Url: https://codereview.chromium.org/2713803003 .
2017-02-23 13:13:44 -08:00
Ben Konyi 47f0da9cd7 Updated MallocHooks to collect stack traces when memory is allocated.
BUG=
R=johnmccutchan@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2680213002 .
2017-02-23 12:42:18 -08:00
Florian Schneider 5399d8acf6 Fix Flutter profile_unopt and release_unopt builds
Fixes #27862.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2516033002 .
2016-11-20 12:17:50 -08:00
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
Ryan Macnak 5f2ea64b13 Remove dead code for writing ICData entries.
R=cbernaschina@google.com

Review URL: https://codereview.chromium.org/2307673002 .
2016-09-01 15:58:32 -07:00
Zachary Anderson e933f28a18 Remove some uses of STL map.
This CL removes the use of STL map from freelist.cc by adding
MallocDirectChainedHashMap in hash_map.h and adding an iterator for
BaseDirectChainedHashMap there.

It also removes a use of STL map from hash_table.h that was dead code.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2083103002 .
2016-06-22 08:32:37 -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
Zachary Anderson 1dfc62c870 Fix Observatory crash for DBC
related #26405

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1971543002 .
2016-05-10 14:37:51 -07:00
Zachary Anderson 87c4171b64 SourceReport should test result of RestoreIcDataMap for NULL entries
Entries in the result can't be the null object, but they can be NULL.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1965523002 .
2016-05-09 14:21:10 -07:00
Todd Turnidge 956ac4c183 Fix getSourceReport's forceCompile option for unused classes.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1916243002 .
2016-05-04 11:02:06 -07:00
John McCutchan a48732a03d Remember thread's task when sampling use it when filtering
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1820013002 .
2016-03-22 08:42:06 -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
Srdjan Mitrovic 420843a75f Clone both descriptor and data array when compiling in background. Eliminates crashes when ic_data array invocation counter is changed while compiling (e.g., NumberOfUsedChecks can change on the fly).
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1700463002 .
2016-02-12 14:54:55 -08:00
Srdjan Mitrovic 5cba052d70 Bailout if field state changed during background compilation.
Bailout if deferred loading cleared ic_data_array.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1672873003 .
2016-02-08 12:51:15 -08: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 a283265955 Add the forceCompile param to _getSourceReport.
Deal with some empty ranges that were being emitted.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1562993003 .
2016-01-07 11:33:33 -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