Skip to content

Commit 71dd85d

Browse files
authored
Merge pull request #9 from mdboom/add-jit
Add support for JIT binaries
2 parents b55fd29 + 232158f commit 71dd85d

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

.github/workflows/benchmark.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ on:
3131
description: 'Make flags for CPython build'
3232
required: false
3333
default: '-j'
34+
llvm:
35+
description: 'LLVM version to use'
36+
required: false
37+
default: '19'
3438

3539
jobs:
3640
benchmark:
@@ -61,8 +65,13 @@ jobs:
6165
# Install CPython dependencies using their script
6266
cd cpython
6367
sudo .github/workflows/posix-deps-apt.sh
64-
65-
# Install Memray dependencies
68+
69+
# Install JIT dependencies
70+
if [ "${{ inputs.binary_id }}" = "jit" ]; then
71+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ inputs.llvm }}
72+
fi
73+
74+
# Install Memray dependencies
6675
sudo apt-get install -y \
6776
python3-dev \
6877
libdebuginfod-dev \
@@ -73,6 +82,10 @@ jobs:
7382
env:
7483
MEMORY_TRACKER_TOKEN: ${{ secrets.MEMORY_TRACKER_TOKEN }}
7584
run: |
85+
if [ "${{ inputs.binary_id }}" = "jit" ]; then
86+
export PATH="$(llvm-config-${{ inputs.llvm }} --bindir):$PATH"
87+
fi
88+
7689
# Build command with conditional flags
7790
CMD="memory-tracker benchmark '${{ github.event.inputs.commit_range }}'"
7891
CMD="$CMD --repo-path ./cpython"

backend/scripts/populate_binaries.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,15 @@ def get_standard_binaries():
110110
"icon": "search",
111111
"display_order": 7,
112112
},
113+
{
114+
"id": "jit",
115+
"name": "JIT Build",
116+
"flags": ["--enable-experimental-jit"],
117+
"description": "Just-In-Time compilation enabled.",
118+
"color": "#fc03df",
119+
"icon": "zap",
120+
"display_order": 8,
121+
},
113122
]
114123

115124

0 commit comments

Comments
 (0)