Frame IDs in trace events are not logged in a consistent format |
||
Issue description
FirstMeaningfulPaint metric is computed from several types of trace events. These events are associated using Frame ID, which is LocalFrame pointer value.
However, this value is not stringified in a consistent way. In 32-bit platforms they look like this:
navigationStart: "args":{"frame":"0xffffffffa0dc1a38"}
FrameLoader snapshot: {"id_ref":"0xa0dc1a38"}
Paint: {"frame":"0xffffffffa0dc1a38"}
FrameView::performLayout: {"frame":"0xa0dc1a38"}
For navigationStart and Paint, the pointer value is casted to intptr_t and then uint64_t:
https://cs.chromium.org/chromium/src/base/trace_event/trace_event_impl.cc?l=259
The others use uintptr_t, so sign extention does not happen.
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/loader/FrameLoader.cpp?rcl=0&l=1619
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/frame/FrameView.cpp?rcl=0&l=855
,
Jun 9 2016
Thanks Ben for the information. > In the mean time, I think that navigationStart and devtools' Paint events should use uintptr_t. Does that sound right to everybody? That sounds good to me. Created a patch that replaces intptr_t with uintptr_t in pointer stringification: https://codereview.chromium.org/2043233003/ If this turns out to be troublesome, we can change the other two to match navigationStart/paint.
,
Jun 9 2016
> I'm not sure how to refer to a FrameBlameContext from inside blink. Given a LocalFrame* named |frame|, the corresponding FrameBlameContext can be obtained as: frame->client()->frameBlameContext() Both client() and frameBlameContext() may return nullptr and need to be checked.
,
Jun 11 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e853dea3b3213b3736f0fa2f36aa8ae05950edf9 commit e853dea3b3213b3736f0fa2f36aa8ae05950edf9 Author: ksakamoto <ksakamoto@chromium.org> Date: Sat Jun 11 01:29:47 2016 Prevent sign extension for pointer trace values This makes 32-bit pointers serialize like "0xdeadbeef", not "0xffffffffdeadbeef". BUG= 618221 Review-Url: https://codereview.chromium.org/2043233003 Cr-Commit-Position: refs/heads/master@{#399347} [modify] https://crrev.com/e853dea3b3213b3736f0fa2f36aa8ae05950edf9/base/trace_event/trace_event_impl.cc [modify] https://crrev.com/e853dea3b3213b3736f0fa2f36aa8ae05950edf9/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
,
Jun 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e853dea3b3213b3736f0fa2f36aa8ae05950edf9 commit e853dea3b3213b3736f0fa2f36aa8ae05950edf9 Author: ksakamoto <ksakamoto@chromium.org> Date: Sat Jun 11 01:29:47 2016 Prevent sign extension for pointer trace values This makes 32-bit pointers serialize like "0xdeadbeef", not "0xffffffffdeadbeef". BUG= 618221 Review-Url: https://codereview.chromium.org/2043233003 Cr-Commit-Position: refs/heads/master@{#399347} [modify] https://crrev.com/e853dea3b3213b3736f0fa2f36aa8ae05950edf9/base/trace_event/trace_event_impl.cc [modify] https://crrev.com/e853dea3b3213b3736f0fa2f36aa8ae05950edf9/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
,
Jun 21 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by benjhayden@chromium.org
, Jun 8 2016