Skip to content

Commit a69e715

Browse files
authored
Merge branch 'bloomberg:main' into xrj_add_grep_tree
2 parents b65da1f + d769830 commit a69e715

35 files changed

+2890
-578
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
name: "Check if generated files are up to date"
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
- name: Set up dependencies
2222
run: |
2323
sudo apt-get update
@@ -41,7 +41,7 @@ jobs:
4141
name: "Test with coverage"
4242
runs-on: ubuntu-latest
4343
steps:
44-
- uses: actions/checkout@v3
44+
- uses: actions/checkout@v4
4545
- name: Set up Python
4646
uses: actions/setup-python@v4
4747
with:
@@ -73,7 +73,7 @@ jobs:
7373
image: alpine
7474
options: --cap-add=SYS_PTRACE
7575
steps:
76-
- uses: actions/checkout@v3
76+
- uses: actions/checkout@v4
7777
- name: Set up dependencies
7878
run: |
7979
apk add --update build-base libunwind-dev lz4-dev musl-dev python3-dev python3-dbg gdb lldb git bash perl perl-datetime build-base perl-app-cpanminus
@@ -105,7 +105,7 @@ jobs:
105105
name: "Lint and Docs"
106106
runs-on: ubuntu-latest
107107
steps:
108-
- uses: actions/checkout@v3
108+
- uses: actions/checkout@v4
109109
- name: Set up Node
110110
uses: actions/setup-node@v3
111111
with:
@@ -136,7 +136,7 @@ jobs:
136136
name: "Valgrind & Helgrind"
137137
runs-on: ubuntu-latest
138138
steps:
139-
- uses: actions/checkout@v3
139+
- uses: actions/checkout@v4
140140
- name: Set up Python 3.10
141141
uses: actions/setup-python@v4
142142
with:

.github/workflows/build_wheels.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
name: Build source distribution
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626

2727
- name: Build sdist
2828
run: pipx run build --sdist
@@ -72,7 +72,7 @@ jobs:
7272
with:
7373
name: tests
7474
path: tests
75-
- uses: docker/setup-qemu-action@v2
75+
- uses: docker/setup-qemu-action@v3
7676
if: runner.os == 'Linux'
7777
name: Set up QEMU
7878
- name: Extract sdist
@@ -82,7 +82,7 @@ jobs:
8282
run: |
8383
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
8484
- name: Build wheels
85-
uses: pypa/cibuildwheel@v2.14.1
85+
uses: pypa/cibuildwheel@v2.15.0
8686
env:
8787
CIBW_BUILD: ${{ matrix.cibw_python }}
8888
CIBW_ARCHS_LINUX: ${{ matrix.cibw_arch }}
@@ -124,7 +124,7 @@ jobs:
124124
echo "CFLAGS=-target arm64-apple-macos11" >> $GITHUB_ENV
125125
echo "MEMRAY_LIBBACKTRACE_TARGET=arm64-apple-macos11" >> $GITHUB_ENV
126126
- name: Build wheels
127-
uses: pypa/cibuildwheel@v2.14.1
127+
uses: pypa/cibuildwheel@v2.15.0
128128
env:
129129
CIBW_BUILD: ${{ matrix.cibw_python }}
130130
CIBW_ARCHS_MACOS: ${{ matrix.cibw_arch }}
@@ -148,10 +148,6 @@ jobs:
148148
with:
149149
name: dist
150150
path: dist
151-
- name: Avoid publishing Python 3.12 wheels
152-
run: |
153-
rm -f dist/*cp312*
154-
ls -l dist/
155151
- uses: pypa/gh-action-pypi-publish@release/v1
156152
with:
157153
skip_existing: true
@@ -164,7 +160,7 @@ jobs:
164160
permissions:
165161
contents: write
166162
steps:
167-
- uses: actions/checkout@v3
163+
- uses: actions/checkout@v4
168164
- name: Set up Python
169165
uses: actions/setup-python@v4
170166
with:

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232
steps:
33-
- uses: actions/checkout@v3
33+
- uses: actions/checkout@v4
3434
- name: Set up Python
3535
uses: actions/setup-python@v4
3636
with:
5.15 KB
Loading
-1.37 KB
Binary file not shown.

docs/_templates/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
background-image: url("{{pathto('_static/images/circle_outer_opt.png', 1)}}");
2626
}
2727
</style>
28+
<link rel="icon" href="_static/favicon.ico">
2829

2930
</head>
3031

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
html_additional_pages = {
4141
"index": "index.html",
4242
}
43+
html_favicon = "favicon.ico"
4344

4445
# -- Options for smartquotes ----------------------------------------------------------
4546

docs/favicon.ico

15 KB
Binary file not shown.

docs/flamegraph.rst

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -196,19 +196,24 @@ checkbox:
196196
Note that allocations in these frames will still be accounted for
197197
in parent frames, even if they're hidden.
198198

199-
Inverted View
200-
-----------------
201-
202-
Although the flame graphs explained above show the calling functions below
203-
and memory allocating functions above, flame graphs can be inverted
204-
so that the calling functions are at the top, while memory allocating
205-
functions are at the bottom. In this view, look for wide ceilings
206-
instead of wide plateaus to find functions with the largest allocation
207-
of memory.
208-
209-
To invert the flame graph, press the *Invert* button:
199+
Flames versus Icicles
200+
---------------------
210201

211-
.. image:: _static/images/invert_button.png
202+
The flame graphs explained above show each function above its caller,
203+
with the root at the bottom. This is what's traditionally called
204+
a "flame graph", because the wide base with narrowing columns above it
205+
looks sort of like a burning log with flames leaping into the air above
206+
it. Memray also supports what's sometimes called an "icicle graph",
207+
which has the root at the top. In an icicle graph, each function is
208+
below its caller, and there is a wide ceiling that thinner columns
209+
descend from, like icicles hanging from a roof. Whichever of these modes
210+
you choose, the data shown in the table is the same, just mirrored
211+
vertically.
212+
213+
You can switch between showing a flame graph and an icicle graph with
214+
this toggle button:
215+
216+
.. image:: _static/images/icicle_flame_toggle.png
212217
:align: center
213218

214219
.. _memory-leaks-view:

news/439.feature.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Add a new ``--inverted`` flag to ``memray flamegraph``. In an inverted flame graph, the roots are the functions that allocated memory,
2+
and the children of any given node represent the percentage of that node's
3+
allocations that can be attributed to a particular caller. The inverted flame graph is very helpful in analyzing where memory is being
4+
spent in aggregate.

0 commit comments

Comments
 (0)