Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 401
Fix CPU Profiler when "advanced developer mode" is enabled #9528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
0b23ff89bee401ad7cbe45acf2099d90a67b168890ec66aacFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| { | ||
| "type": "CpuSamples", | ||
| "samplePeriod": 50, | ||
| "maxStackDepth": 10, | ||
| "sampleCount": 1, | ||
| "timeOriginMicros": 0, | ||
| "timeExtentMicros": 100, | ||
| "pid": 12345, | ||
| "functions": [ | ||
| { | ||
| "kind": "Dart", | ||
| "inclusiveTicks": 1, | ||
| "exclusiveTicks": 0, | ||
| "resolvedUrl": "file:///main.dart", | ||
| "function": { | ||
| "type": "@Function", | ||
| "id": "func-0", | ||
| "name": "main", | ||
| "owner": { "type": "@Library", "id": "lib-0", "name": "", "uri": "file:///main.dart" }, | ||
| "isStatic": true, | ||
| "isConst": false, | ||
| "implicit": false | ||
| } | ||
| }, | ||
| { | ||
| "kind": "Dart", | ||
| "inclusiveTicks": 1, | ||
| "exclusiveTicks": 1, | ||
| "resolvedUrl": "file:///main.dart", | ||
| "function": { | ||
| "type": "@Function", | ||
| "id": "func-1", | ||
| "name": "helperFunction", | ||
| "owner": { "type": "@Library", "id": "lib-0", "name": "", "uri": "file:///main.dart" }, | ||
| "isStatic": true, | ||
| "isConst": false, | ||
| "implicit": false | ||
| } | ||
| } | ||
| ], | ||
| "_codes": [ | ||
| { | ||
| "kind": "Dart", | ||
| "inclusiveTicks": 1, | ||
| "exclusiveTicks": 0, | ||
| "code": { | ||
| "type": "@Code", | ||
| "kind": "Dart", | ||
| "name": "main", | ||
| "id": "code-0", | ||
| "function": { | ||
| "type": "@Function", | ||
| "id": "func-0", | ||
| "name": "main", | ||
| "owner": { "type": "@Library", "id": "lib-0", "name": "", "uri": "file:///main.dart" }, | ||
| "isStatic": true, | ||
| "isConst": false, | ||
| "implicit": false | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "kind": "Dart", | ||
| "inclusiveTicks": 1, | ||
| "exclusiveTicks": 1, | ||
| "code": { | ||
| "type": "@Code", | ||
| "kind": "Dart", | ||
| "name": "helperFunction", | ||
| "id": "code-1", | ||
| "function": { | ||
| "type": "@Function", | ||
| "id": "func-1", | ||
| "name": "helperFunction", | ||
| "owner": { "type": "@Library", "id": "lib-0", "name": "", "uri": "file:///main.dart" }, | ||
| "isStatic": true, | ||
| "isConst": false, | ||
| "implicit": false | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "kind": "Stub", | ||
| "inclusiveTicks": 1, | ||
| "exclusiveTicks": 0, | ||
| "code": { | ||
| "type": "@Code", | ||
| "kind": "Stub", | ||
| "name": "WriteBarrierStub", | ||
| "id": "code-2", | ||
| "function": { | ||
| "type": "NativeFunction", | ||
| "id": "native-2", | ||
| "name": "WriteBarrierStub" | ||
| } | ||
| } | ||
| } | ||
| ], | ||
| "samples": [ | ||
| { | ||
| "tid": 100, | ||
| "timestamp": 50, | ||
| "stack": [0, 1], | ||
| "_codeStack": [2] | ||
MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before the change, the regression test would fail because we would try to index into | ||
| } | ||
| ] | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check
index >= functions.lengthis not strictly necessary but I want to be extra safe.