Skip to content
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

Add callgraph examples to README.md #528

Merged
merged 24 commits into from
Apr 29, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,13 @@ in a browser to see the interface.

The objective of pprof is to generate a report for a profile. The report is
generated from a location hierarchy, which is reconstructed from the profile
samples. Each location contains two values: *flat* is the value of the location
itself, while *cum* is the value of the location plus all its
descendants. Samples that include a location multiple times (eg for recursive
functions) are counted only once per location.
samples. Each location contains two values:

* *flat*: the value of the location itself.
* *cum*: the value of the location plus all its descendants.

Samples that include a location multiple times (eg for recursive functions)
wyk9787 marked this conversation as resolved.
Show resolved Hide resolved
are counted only once per location.

## Options

Expand Down Expand Up @@ -191,33 +194,34 @@ paths with the highest cum weight.
browser to view it.
* **-png, -jpg, -gif, -pdf:** Generates a report in these formats.

### Interpreting the Callgraph
### Interpreting the Nodes

![callgraph1](images/callgraph_nodes.svg)
wyk9787 marked this conversation as resolved.
Show resolved Hide resolved

* **Total Value**: amount of resource used by location and all location it
calls.
* _cum_ value is indiated by the nodes' color.
wyk9787 marked this conversation as resolved.
Show resolved Hide resolved
wyk9787 marked this conversation as resolved.
Show resolved Hide resolved

* Redder nodes have larger total values.
wyk9787 marked this conversation as resolved.
Show resolved Hide resolved
* Greyer nodes have smaller total values.

* **Self Value**: amount of resource used by lines of code within the
location.
* _flat_ value is indicated by the font size.

* Nodes with larger text have larger self values.
* Nodes with smaller text have smaller self values.

![callgraph1](images/callgraph1.svg)

### Interpreting the Edges

![callgraph2](images/callgraph_edges.svg)

* **Dashed Edges**: some locations between two connected locations were
wyk9787 marked this conversation as resolved.
Show resolved Hide resolved
pruned.
removed.

wyk9787 marked this conversation as resolved.
Show resolved Hide resolved
* **Solid Edges**: one location directly calls the other.

* **Thicker & Redder Edges**: more resources were along that path.
wyk9787 marked this conversation as resolved.
Show resolved Hide resolved

* **Thinner & Greyer Edges**: less resources were along that path.

![callgraph2](images/callgraph2.svg)

## Annotated code

pprof can also generate reports of annotated source with samples associated to
Expand Down
1 change: 0 additions & 1 deletion doc/images/callgraph1.svg

This file was deleted.

1 change: 0 additions & 1 deletion doc/images/callgraph2.svg

This file was deleted.