Comments (4)
The period is just an annotation: it is not needed to interpret the samples. Currently we chose to keep track of the max period, but we could also just clear it out on mismatch if it causes potential confusion.
I don't think any normalization is needed, as the data is unsampled. Can you elaborate?
About symbolization, profile.proto should transparently support mappings with and without symbols on the same profile. Some tools have heuristics to treat the first mapping specially (In particular when pprof receives a program filename on the command line) but in general we should discourage that.
I think the only issue is handling profiles with mismatching sample types. There are many options here:
- Append the sample types horizontally on mismatch: eg if you have sample types [ao as io is] and [o s], we would end up with [ao as io is o s]
- Introduce a mechanism to specify equivalences (tell pprof to merge io and o and is and s), so we would end up with [ao as io+o is+s]
- Same as 2, but only show the intersection (I think this is what you were originally advocating). End up with [io+o is+s].
Or, if we could get C++ and Go to match their profile types, that would simplify options 2 or 3:
Eg Have Go generate Samples: alloc_objects/count alloc_space/bytes objects/count space/bytes
from pprof.
Thanks! Reading the Go's implementation, yes, it does scaling based on its sampling rate so the number in the proto is already scaled, unsampled value. That makes problem simpler.
The option 1 is not ideal - adds complexity to pprof user.
I didn't think about the possibility of changing the sample name; that simplifies the merging a lot.
Will it break anything in pprof tool?
Do other languages generate the same sample format as C++?
What do you think about having pprof/profile package hard coded mapping to deal with Go (so it can continue to work with Go binaries compiled with old and current Go)?
from pprof.
Internally at Google we have code which merges profiles collected at different point in times, the current implementation won't handle well the merge if we drop the inuse_ prefix for the metrics, but this can be fixed if required.
from pprof.
pprof can deal with arbitrary names so it shouldn't break by changing sample type names.
What can break is other tools that currently depend on the names, and the merging of profiles before/after change as Alexey pointed out.
If we are to hardcode anything into pprof I would prefer it to be a temporary migration aid, so changing the sample type to match C++ and having pprof temporarily combine io and o seems a reasonable solution to me. Note that this will be a user-visible change as the profile reports will say "objects" where they currently say "inuse_objects".
from pprof.
Related Issues (20)
- 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
- How to load debug symbols from separately installed `-dbgsym` packages? HOT 7
- don't need profile after convert HOT 1
- Pprof does not resolve symbols HOT 1
- [Help Needed] How to Accelerate `pprof -top` Command Execution for Profiling Data? HOT 2
- extended dependencies because of browser test HOT 4
- panics if profile is not found HOT 1
- The calling relationship of CPU profile results is wrong HOT 3
- New flamegraph cannot copy strings
- Unknown heap traces HOT 1
- list [-e] [-f format] [-json] [build flags] HOT 1
- list [-e] [-f format] [-json] [build flags] ...
- How to efficiently compress pprof files? HOT 1
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.