Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
b79910f
use merge-downstream
taegyunkim Feb 25, 2025
76178d9
compiles
taegyunkim Feb 25, 2025
043f750
observe idle threads
taegyunkim Feb 25, 2025
204ce05
add open()
taegyunkim Feb 25, 2025
eef215a
trigger tests
taegyunkim Feb 25, 2025
7a9a0a1
set it for the extension only
taegyunkim Feb 25, 2025
fea641f
format
taegyunkim Feb 26, 2025
b31b776
compile with echion cc files
taegyunkim Feb 26, 2025
41593a7
update comment
taegyunkim Feb 26, 2025
ccf19f4
update
taegyunkim Feb 27, 2025
ed1101f
Merge branch 'main' into taegyunkim/echion-upstream
taegyunkim Feb 27, 2025
8dbe4c5
format
taegyunkim Feb 27, 2025
152312f
remove prints
taegyunkim Feb 27, 2025
1b91ced
Merge branch 'main' into taegyunkim/echion-upstream
taegyunkim Feb 27, 2025
1922c65
update branch
taegyunkim Mar 3, 2025
15ca08d
set max frames
taegyunkim Mar 3, 2025
f3dc5ff
Merge branch 'main' into taegyunkim/echion-upstream
taegyunkim Mar 3, 2025
bb6c68a
fix
taegyunkim Mar 3, 2025
32c987e
Merge branch 'main' into taegyunkim/echion-upstream
taegyunkim Mar 3, 2025
6884427
Merge branch 'main' into taegyunkim/echion-upstream
taegyunkim Mar 3, 2025
2c0a5f4
chore(profiling): output package root dir name only instead of full path
taegyunkim Mar 3, 2025
7c3c3de
Merge branch 'main' into taegyunkim/code-prove-dir
taegyunkim Mar 3, 2025
0cadca5
fix format
taegyunkim Mar 3, 2025
367dd8a
pass package name
taegyunkim Mar 3, 2025
9d73ba3
append properly
taegyunkim Mar 3, 2025
78aed3a
Merge branch 'main' into taegyunkim/echion-upstream
taegyunkim Mar 3, 2025
fe65580
Merge branch 'taegyunkim/code-prove-dir' into taegyunkim/echion-upstream
taegyunkim Mar 3, 2025
ab3fd75
fix test
taegyunkim Mar 4, 2025
b339394
remove package names
taegyunkim Mar 4, 2025
2c04e35
Merge branch 'taegyunkim/code-prove-dir' into taegyunkim/echion-upstream
taegyunkim Mar 4, 2025
7d2ad6d
format
taegyunkim Mar 4, 2025
ddb51d5
format
taegyunkim Mar 4, 2025
7109a20
Merge branch 'taegyunkim/code-prove-dir' into taegyunkim/echion-upstream
taegyunkim Mar 4, 2025
c5351fe
use default 2048 to check savings from using 64
taegyunkim Mar 6, 2025
945a352
update branch
taegyunkim Mar 6, 2025
4410347
typo
taegyunkim Mar 6, 2025
1d5e3c4
revert codeprovenance changes
taegyunkim Mar 6, 2025
7415c19
Merge branch 'main' into taegyunkim/echion-upstream
taegyunkim Mar 6, 2025
c9c821f
Discard changes to ddtrace/internal/datadog/profiling/stack_v2/src/st…
taegyunkim Mar 6, 2025
422330e
Discard changes to ddtrace/profiling/collector/stack.pyx
taegyunkim Mar 6, 2025
c1a9221
use upstream echion
taegyunkim Mar 6, 2025
b5daad8
minimize diff
taegyunkim Mar 6, 2025
0228a32
add comment
taegyunkim Mar 6, 2025
c28da6c
update comment
taegyunkim Mar 6, 2025
d75f8ce
minimize diff
taegyunkim Mar 7, 2025
92dc0a9
Merge branch 'main' into taegyunkim/echion-upstream
taegyunkim Mar 7, 2025
3d99340
add reno
taegyunkim Mar 7, 2025
f94cbe2
update test
taegyunkim Mar 7, 2025
f56dd43
revert
taegyunkim Mar 7, 2025
c098796
Merge branch 'main' into taegyunkim/echion-upstream
taegyunkim Mar 19, 2025
5a12525
point to proc/stat branch
taegyunkim Mar 19, 2025
885b9b4
test v2 with 3.13
taegyunkim Mar 7, 2025
c0ee2b2
update riotfiles
taegyunkim Mar 7, 2025
8fef3a5
remove version check
taegyunkim Mar 7, 2025
972e64c
use echion with compile fix
taegyunkim Mar 7, 2025
7dd4eed
update test case
taegyunkim Mar 7, 2025
45f3554
Discard changes to ddtrace/internal/datadog/profiling/stack_v2/CMakeL…
taegyunkim Mar 19, 2025
d92989f
test on 3.13
taegyunkim Mar 19, 2025
34a580e
Merge branch 'main' into taegyunkim/echion-upstream
taegyunkim Mar 20, 2025
69772cb
Set echion commit hash to the one on main
taegyunkim Mar 20, 2025
f3ebc0a
Merge branch 'taegyunkim/echion-upstream' into taegyunkim/prof-11158-…
taegyunkim Mar 20, 2025
aec59e3
update test for py13
taegyunkim Mar 20, 2025
2ed726a
release note
taegyunkim Mar 20, 2025
4417785
simplify
taegyunkim Mar 20, 2025
e69ec2a
add 3.13 venv
taegyunkim Jan 16, 2025
24ae608
format
taegyunkim Mar 20, 2025
02e968e
Merge branch 'main' into taegyunkim/prof-11158-3.13
taegyunkim Mar 20, 2025
fcd84ac
update riotfile
taegyunkim Mar 20, 2025
ba98211
udpate riotfile
taegyunkim Mar 20, 2025
b481bc3
Merge branch 'main' into taegyunkim/prof-11158-3.13
taegyunkim Mar 21, 2025
d20810c
add comment
taegyunkim Mar 21, 2025
065ed6b
Merge branch 'main' into taegyunkim/prof-11158-3.13
taegyunkim Mar 21, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/profiling-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-24.04]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
sanitizer: ["safety", "thread", "valgrind"]

steps:
Expand Down
33 changes: 33 additions & 0 deletions .riot/requirements/955b213.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# This file is autogenerated by pip-compile with Python 3.13
# by the following command:
#
# pip-compile --allow-unsafe --no-annotate .riot/requirements/955b213.in
#
attrs==25.1.0
coverage[toml]==7.6.12
gevent==24.11.1
greenlet==3.1.1
gunicorn[gevent]==23.0.0
hypothesis==6.45.0
iniconfig==2.0.0
lz4==4.4.3
mock==5.2.0
opentracing==2.4.0
packaging==24.2
pluggy==1.5.0
py-cpuinfo==8.0.0
pytest==8.3.5
pytest-asyncio==0.21.1
pytest-benchmark==5.1.0
pytest-cov==6.0.0
pytest-cpp==2.6.0
pytest-mock==3.14.0
pytest-randomly==3.16.0
sortedcontainers==2.4.0
uwsgi==2.0.28
zope-event==5.0
zope-interface==7.2

# The following packages are considered to be unsafe in a requirements file:
setuptools==75.8.2
27 changes: 27 additions & 0 deletions .riot/requirements/cb9a5da.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# This file is autogenerated by pip-compile with Python 3.13
# by the following command:
#
# pip-compile --allow-unsafe --no-annotate .riot/requirements/cb9a5da.in
#
attrs==25.1.0
coverage[toml]==7.6.12
gunicorn==23.0.0
hypothesis==6.45.0
iniconfig==2.0.0
lz4==4.4.3
mock==5.2.0
opentracing==2.4.0
packaging==24.2
pluggy==1.5.0
protobuf==4.22.0
py-cpuinfo==8.0.0
pytest==8.3.5
pytest-asyncio==0.21.1
pytest-benchmark==5.1.0
pytest-cov==6.0.0
pytest-cpp==2.6.0
pytest-mock==3.14.0
pytest-randomly==3.16.0
sortedcontainers==2.4.0
uwsgi==2.0.28
27 changes: 27 additions & 0 deletions .riot/requirements/d449a90.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# This file is autogenerated by pip-compile with Python 3.13
# by the following command:
#
# pip-compile --allow-unsafe --no-annotate .riot/requirements/d449a90.in
#
attrs==25.1.0
coverage[toml]==7.6.12
gunicorn==23.0.0
hypothesis==6.45.0
iniconfig==2.0.0
lz4==4.4.3
mock==5.2.0
opentracing==2.4.0
packaging==24.2
pluggy==1.5.0
protobuf==6.30.0
py-cpuinfo==8.0.0
pytest==8.3.5
pytest-asyncio==0.21.1
pytest-benchmark==5.1.0
pytest-cov==6.0.0
pytest-cpp==2.6.0
pytest-mock==3.14.0
pytest-randomly==3.16.0
sortedcontainers==2.4.0
uwsgi==2.0.28
5 changes: 5 additions & 0 deletions releasenotes/notes/profiling-3.13-e62c18bff5de1218.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
features:
- |
profiling: Stack v2 supports CPython 3.13.

23 changes: 2 additions & 21 deletions riotfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2926,28 +2926,9 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT
),
],
),
# Python 3.11
Venv(
pys="3.11",
pkgs={"uwsgi": latest},
venvs=[
Venv(
pkgs={
"protobuf": ["==4.22.0", latest],
},
),
# Gevent
Venv(
env={
"DD_PROFILE_TEST_GEVENT": "1",
},
pkgs={"gunicorn[gevent]": latest, "gevent": latest},
),
],
),
# Python 3.12
# Python >= 3.11
Venv(
pys="3.12",
pys=select_pys("3.11", "3.13"),
pkgs={"uwsgi": latest},
venvs=[
Venv(
Expand Down
15 changes: 7 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,14 +666,13 @@ def get_exts_for(name):
)
)

if sys.version_info < (3, 13):
ext_modules.append(
CMakeExtension(
"ddtrace.internal.datadog.profiling.stack_v2._stack_v2",
source_dir=STACK_V2_DIR,
optional=False,
),
)
ext_modules.append(
CMakeExtension(
"ddtrace.internal.datadog.profiling.stack_v2._stack_v2",
source_dir=STACK_V2_DIR,
optional=False,
),
)

else:
ext_modules = []
Expand Down
23 changes: 15 additions & 8 deletions tests/profiling_v2/collector/test_memalloc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import inspect
import os
import sys
import threading

import pytest
Expand All @@ -9,6 +10,9 @@
from tests.profiling.collector import pprof_utils


PY_313_OR_ABOVE = sys.version_info[:2] >= (3, 13)


def _allocate_1k():
return [object() for _ in range(1000)]

Expand Down Expand Up @@ -140,6 +144,7 @@ def test_heap_profiler_large_heap_overhead():
# Un-skip this test if/when we improve the worst-case performance of the
# heap profiler for large heaps
from ddtrace.profiling import Profiler
from tests.profiling_v2.collector.test_memalloc import one

p = Profiler()
p.start()
Expand All @@ -149,10 +154,10 @@ def test_heap_profiler_large_heap_overhead():

junk = []
for i in range(count):
b1 = bytearray(thing_size)
b2 = bytearray(2 * thing_size)
b3 = bytearray(3 * thing_size)
b4 = bytearray(4 * thing_size)
b1 = one(thing_size)
b2 = one(2 * thing_size)
b3 = one(3 * thing_size)
b4 = one(4 * thing_size)
t = (b1, b2, b3, b4)
junk.append(t)

Expand All @@ -164,20 +169,22 @@ def test_heap_profiler_large_heap_overhead():
# one, two, three, and four exist to give us distinct things
# we can find in the profile without depending on something
# like the line number at which an allocation happens
# Python 3.13 changed bytearray to use an allocation domain that we don't
# currently profile, so we use None instead of bytearray to test.
def one(size):
return bytearray(size)
return (None,) * size if PY_313_OR_ABOVE else bytearray(size)


def two(size):
return bytearray(size)
return (None,) * size if PY_313_OR_ABOVE else bytearray(size)


def three(size):
return bytearray(size)
return (None,) * size if PY_313_OR_ABOVE else bytearray(size)


def four(size):
return bytearray(size)
return (None,) * size if PY_313_OR_ABOVE else bytearray(size)


class HeapInfo:
Expand Down
Loading