Comments (6)
I think we should add one or the other, having both column and discriminator fields would look confusing IMO - like two identifiers of a position or fragment within the source line.
Maybe we should add the discriminator field with the comment that for languages that use DWARF to resolve the debug info this is the DWARF discriminator and other languages like JS can give a special meaning to it like column number.
from pprof.
having both line and discriminator fields would look confusing
I assume you mean "column and discriminator fields" here?
Maybe we should add the discriminator field with the comment that for languages that use DWARF to resolve the debug info this is the DWARF discriminator and other languages like JS can give a special meaning to it like column number.
This seems reasonable to me. w.r.t. DWARF, I'll note that the spec quote above says: "Discriminator values ... distinguish among multiple blocks that may all be associated with the same source file, line, and column. Where only one block exists for a given source position, the discriminator value is be zero (sic)."
My read of that is that the discriminator should only be set if the column is insufficient to discriminate, which would mean we'd need both. However, LLVM does not appear to follow the spec. In addDiscriminators
, only filename + line is considered (L208). Column number is ignored. This makes sense considering that LLVM profile format only contains line + discriminator.
from pprof.
I assume you mean "column and discriminator fields" here?
Sorry, yes. Updated the text retroactively.
My read of that is that the discriminator should only be set if the column is insufficient to discriminate, which would mean we'd need both. However, LLVM does not appear to follow the spec.
Thanks for pointing out this detail. Yes, our internal symbolization pipeline also only carries the line number and the discriminator, not also the column number, so practically I think the two should be sufficient.
from pprof.
There is #818 in review currently which will address #687 (adding column field in the Line message). I don't think we will be adding both fields unless a strong use case emerges, so when the discriminator is needed I would propose using the column field for it. Closing this issue as "not planned" - please feel free to re-open if the proposed solution does not work.
from pprof.
when the discriminator is needed I would propose using the column field for it.
The downside to this is that today Go's PGO uses standard CPU profiles emitted from runtime/pprof
, etc. If we put a discriminator rather than a column number in the "column" field, it will be confusing to anyone analyzing CPU profiles, as we seem to be reporting incorrect nonsense column numbers.
from pprof.
I think it may be a sign that a more specialized format would be a better thing here then. Including every possible bit of information in profile.proto can make hard to manage over time.
from pprof.
Related Issues (20)
- Switch to the new flame graph implementation by default and remove d3 dependency HOT 3
- Hash-pin workflow Actions
- Module did not self-register: Worker Threads HOT 1
- disasm: no matches found for regexp HOT 2
- Add tests for javascript code HOT 3
- Error & Troubleshooting HOT 1
- Support code coverage in javascript test HOT 1
- Add elf type and load segment information to mapping HOT 1
- pprof on MacOS can't find dot? HOT 3
- UI Support for tag commands: tagfocus, tagignore, tagshow, tagroot, etc HOT 1
- -tagroot and -tagleaf in UI aren't including the tag name? HOT 4
- New flame graph appears to reset the profile state in an unexpected way HOT 1
- If the file under the current path contains a colon, go tool pprof will parse it into a url and will not work properly.
- Compatibility guarantees for Profile-Guided Optimization (PGO) purposes with Go HOT 2
- Set Function.start_line when symbolizing HOT 3
- Patch CVE for d3-color HOT 1
- make sources/sinks a different color HOT 2
- Canvas size related to initial size of a graph, should use the full space
- New flamegraph: 'hover shows details on the top' from old flame-graph missing
- Nice to have: 'grab' cursor when dragging the graph HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pprof.