-
Notifications
You must be signed in to change notification settings - Fork 618
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
Proposal: Add Column field to Line message #687
Comments
@aalexand we're currently thinking about potential improvements to profile.proto at Datadog. Before submitting any bigger proposals, what do you think about this small one that my colleague @mar-kolya made a while ago? He just updated to title/text to make the proposal more clear. If accepted, we'd be happy to send a PR for the profile pkg to support encoding/decoding this new field. |
@felixge @mar-kolya No conceptual objections but it would be good to include in the description how this will integrate with pprof as a tool. In particular (not an exhaustive list):
I basically want to make sure that if we add this field then we do our best to identify what full support for the new field looks like in pprof and have this support added as part of the PR that adds the field, including tests. |
@aalexand I've updated the proposal. Please let me know what do you think. |
I wonder whether it's possible to avoid adding Similarly I would prefer to avoid adding has_column_numbers. These has_* fields are typically populated based on the detail level of debug info and "has column number" doesn't quite fit that. |
@aalexand I'll let @mar-kolya confirm, but AFAIK we're totally happy with following your suggestions. Our current workaround for minified JS has been to put both column and line numbers into the line field (using 32 bit for each). This works for our use case, but since we're invested in pprof we'd love to contribute back and make the format better for everybody as well. |
Sounds good to me, updated original proposal. |
One question I have on this: rendering performance data on a long source line is not very usable so I would expect that at some point of the profile data processing the data needs to be re-mapped to the original source lines via source maps? |
Yes, that indeed happens. But this happens on the pprof data outside of the process that created the pprof file. That being said: this was just original usecase that has inspired this ticket. I'm sure there are languages where knowing column number is useful because there are multiple statements on the same line - but those languages do not put everything onto one line. |
I think the |
FTR, #818 is in review for this feature. |
This change adds column numbers to the line message in profile.proto. This allows users to distinguish between souce code locations on the same line. Only the llvm addr2line is capable of reading column number information from dwarf debug information. Other changes include: * Add "columns" option for output granularity. * Account for column numbers during profile merge. * Update the encoder and decoder. * Update golden test files for legacy profiles. Fixes google#687
This change adds column numbers to the line message in profile.proto. This allows users to distinguish between souce code locations on the same line. Only the llvm addr2line is capable of reading column number information from dwarf debug information. Other changes include: * Add "columns" option for output granularity. * Account for column numbers during profile merge. * Update the encoder and decoder. * Update golden test files for legacy profiles. Fixes google#687
This change adds column numbers to the line message in profile.proto. This allows users to distinguish between souce code locations on the same line. Only the llvm based addr2line is capable of reading column number information from dwarf and PE debug information. Other changes include: * Add "columns" option for output granularity. * Account for column numbers during profile merge. * Update the encoder and decoder. * Update golden test files for legacy profiles. Fixes google#687
* Add column numbers to profile.proto. This change adds column numbers to the line message in profile.proto. This allows users to distinguish between souce code locations on the same line. Only the llvm based addr2line is capable of reading column number information from dwarf and PE debug information. Other changes include: * Add "columns" option for output granularity. * Account for column numbers during profile merge. * Update the encoder and decoder. * Update golden test files for legacy profiles. Fixes #687 * Update the expecatations in the test to match testdata. * Update report generation and driver for column numbers. * Address comments --------- Co-authored-by: Alexey Alexandrov <aalexand@users.noreply.github.com>
It would be really useful to have a
column
field along with the line number field in theLine
message. This is especially useful for runtimes that use source code compacting/obfuscation like Javascript.In
profile.proto
this would look like:Additional changes to the
pprof
tool:-lines
is used.pprof
currently outputs<path>:<line>
make it output<path>:<line>:<column>
when column is available.merge.go
needs updating to take into account column numbers, also(*Profile).Aggregate(), aggregate()
indriver.go
. We would need to check all the places whereLine.line
is used.Please let me know what you think.
Thanks!
The text was updated successfully, but these errors were encountered: