Skip to content

Add support for column property in frameTable object and update gecko version to 12, processed version to 15#1180

Merged
gregtatum merged 11 commits into
firefox-devtools:masterfrom
dpalmeiro:master
Aug 16, 2018
Merged

Add support for column property in frameTable object and update gecko version to 12, processed version to 15#1180
gregtatum merged 11 commits into
firefox-devtools:masterfrom
dpalmeiro:master

Conversation

@dpalmeiro

Copy link
Copy Markdown
Contributor

The corresponding gecko change for this pull request will emit column numbers to the JS functions and scripts. Most of this will be encapsulated in the JS description string, but there is also a new property in the frameTable object on each thread called "column". For clarity, the new property will replace the old "category" schema index value so that it can exist right after the "line" property. The schema index for the "category" property will now be "5", instead of "4" to accommodate.

To support the above changes, the gecko profile version will be upgraded to 12 and the processed profile version will be upgraded to 15. Test cases are updated as necessary.

@codecov

codecov Bot commented Aug 7, 2018

Copy link
Copy Markdown

Codecov Report

Merging #1180 into master will decrease coverage by 0.29%.
The diff coverage is 96%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1180     +/-   ##
=========================================
- Coverage   76.06%   75.77%   -0.3%     
=========================================
  Files         144      144             
  Lines        9426     9337     -89     
  Branches     2298     2251     -47     
=========================================
- Hits         7170     7075     -95     
- Misses       2014     2015      +1     
- Partials      242      247      +5
Impacted Files Coverage Δ
src/test/fixtures/profiles/gecko-profile.js 100% <ø> (ø) ⬆️
src/test/fixtures/profiles/call-nodes.js 100% <ø> (ø) ⬆️
src/test/fixtures/profiles/timings-with-js.js 100% <ø> (ø) ⬆️
src/profile-logic/process-profile.js 86% <ø> (-0.3%) ⬇️
src/profile-logic/profile-data.js 81.04% <0%> (-0.14%) ⬇️
src/profile-logic/transforms.js 89.09% <100%> (+0.01%) ⬆️
src/profile-logic/gecko-profile-versioning.js 90.67% <100%> (+0.78%) ⬆️
src/test/fixtures/profiles/make-profile.js 96.51% <100%> (+0.02%) ⬆️
src/profile-logic/processed-profile-versioning.js 94.24% <100%> (+0.1%) ⬆️
src/components/shared/MarkerTooltipContents.js 71% <0%> (-14.79%) ⬇️
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 97d0a50...fd757fe. Read the comment docs.

@dpalmeiro

Copy link
Copy Markdown
Contributor Author

The gecko bug associated with this change is: https://bugzilla.mozilla.org/show_bug.cgi?id=785922

@gregtatum gregtatum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, the changes look pretty reasonable to handle the incoming format. The biggest thing that needs to be fixed is the processed profile type definition.

It looks like the FrameTable in src/types/profile.js still needs to be updated to take into account the changes. This should cause type errors everywhere we manually generate a FrameTable, although we should probably do some manual searching to ensure that the types found all of the instances where we are manually recreating the FrameTable.

Example location: https://github.com/devtools-html/perf.html/blob/8cf90bac49e911ce6228d5721cba389eb462a54f/src/profile-logic/transforms.js#L757-L765

Also, I'd like to wait until both the Gecko patch and this one are both r+ed before merging. I'm not sure if you already have thought through and have a plan for the landing process.

Thanks!

//the old value used by the "category" property (4). The new value for
//"category" will be 5. The upgrader needs to remap all of the old category
//indices to the new one, and delete the old property in each frame.
const oldSchemaCategoryIndex = 4;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's strictly necessary to remap the schema, as the converter does not rely on the order of the values, however this probably still gives the same results.

convertToVersionElevenRecursive(profile);
},
[12]: profile => {
//This version will add column numbers to the JS functions and scripts.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny style nit: Generally we have a space after the // in comments in this project.

@gregtatum gregtatum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I did another manual audit of the frameTable locations just in case, and it looks like every case is handled.

I checked the status of the other bug, is there a patch for handling the devtools performance tool? I think the change will invalidate their regex, and that will need to be handled before we land this.

Once the Gecko patch(es) are completely handled we can land and then deploy.

@dpalmeiro

Copy link
Copy Markdown
Contributor Author

@gregtatum When I took a look it seemed like the devtools performance panel is already capable of parsing the column number field, ,i.e.: https://searchfox.org/mozilla-central/source/devtools/client/performance/modules/logic/frame-utils.js#103. I did a couple manual tests as well and I think it looks like it's working as intended out of the box?

screenshot from 2018-08-14 10-09-25

@gregtatum

Copy link
Copy Markdown
Member

Oh nice! In that case, are you ready for me to merge?

@dpalmeiro

Copy link
Copy Markdown
Contributor Author

@gregtatum yup, thanks!

@gregtatum gregtatum merged commit 9409021 into firefox-devtools:master Aug 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants