Skip to content

Conversation

@corona10
Copy link
Member

@corona10 corona10 commented Jul 28, 2024

@corona10
Copy link
Member Author

@pablogsal I think that there is no harm in adding support for musl.

@pablogsal
Copy link
Member

@pablogsal I think that there is no harm in adding support for musl.

I am a bit hessitant because we don't have CI for this. Have we tried it at least in a musl container or system and check that works?

Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but see my comment

@corona10
Copy link
Member Author

I am a bit hessitant because we don't have CI for this. Have we tried it at least in a musl container or system and check that works?

I will share the result of cross-check from my side before merging this.

@corona10
Copy link
Member Author

@pablogsal See my verification script. :)

main

Dockerfile

FROM alpine:latest

# install build dependencies and needed tools
RUN apk add \
    wget \
    git \
    gcc \
    make \
    perf \
    zlib-dev \
    libffi-dev \
    openssl-dev \
    musl-dev


RUN cd /opt && git clone https://github.com/python/cpython.git
RUN cd /opt/cpython && ./configure && make -j8 && ./python -m test test_perf_profiler -v

Output

0:00:00 load avg: 6.37 Run 1 test sequentially in a single process
0:00:00 load avg: 6.37 [1/1] test_perf_profiler
test_perf_profiler skipped -- perf trampoline profiling not supported
test_perf_profiler skipped

== Tests result: SUCCESS ==

1 test skipped:
    test_perf_profiler

Total duration: 65 ms
Total tests: run=0
Total test files: run=1/1 skipped=1
Result: SUCCESS

PR

Dockerfile

FROM alpine:latest

# install build dependencies and needed tools
RUN apk add \
    wget \
    git \
    gcc \
    make \
    perf \
    zlib-dev \
    libffi-dev \
    openssl-dev \
    musl-dev


RUN cd /opt && git clone https://github.com/corona10/cpython.git
RUN cd /opt/cpython && git checkout gh-121608 && ./configure && make -j8 && ./python -m test test_perf_profiler -v

Output

0:00:00 load avg: 6.55 Run 1 test sequentially in a single process
0:00:00 load avg: 6.55 [1/1] test_perf_profiler
test_pre_fork_compile (test.test_perf_profiler.TestPerfProfiler.test_pre_fork_compile) ... skipped "perf command doesn't work"
test_python_calls_appear_in_the_stack_if_perf_activated (test.test_perf_profiler.TestPerfProfiler.test_python_calls_appear_in_the_stack_if_perf_activated) ... skipped "perf command doesn't work"
test_python_calls_do_not_appear_in_the_stack_if_perf_deactivated (test.test_perf_profiler.TestPerfProfiler.test_python_calls_do_not_appear_in_the_stack_if_perf_deactivated) ... skipped "perf command doesn't work"
test_python_calls_appear_in_the_stack_if_perf_activated (test.test_perf_profiler.TestPerfProfilerWithDwarf.test_python_calls_appear_in_the_stack_if_perf_activated) ... skipped "perf command doesn't work"
test_python_calls_do_not_appear_in_the_stack_if_perf_deactivated (test.test_perf_profiler.TestPerfProfilerWithDwarf.test_python_calls_do_not_appear_in_the_stack_if_perf_deactivated) ... skipped "perf command doesn't work"
test_sys_api (test.test_perf_profiler.TestPerfTrampoline.test_sys_api) ... ok
test_sys_api_get_status (test.test_perf_profiler.TestPerfTrampoline.test_sys_api_get_status) ... ok
test_sys_api_with_existing_trampoline (test.test_perf_profiler.TestPerfTrampoline.test_sys_api_with_existing_trampoline) ... ok
test_sys_api_with_invalid_trampoline (test.test_perf_profiler.TestPerfTrampoline.test_sys_api_with_invalid_trampoline) ... ok
test_trampoline_works (test.test_perf_profiler.TestPerfTrampoline.test_trampoline_works) ... ok
test_trampoline_works_with_forks (test.test_perf_profiler.TestPerfTrampoline.test_trampoline_works_with_forks) ... ok

----------------------------------------------------------------------
Ran 11 tests in 0.245s

OK (skipped=5)

== Tests result: SUCCESS ==

1 test OK.

Total duration: 453 ms
Total tests: run=11 skipped=5
Total test files: run=1/1
Result: SUCCESS
COMMIT
--> 9f33d8c1b2ec
9f33d8c1b2ecc190f5c9bd3af27b7a402877ba45983043ade8afea0367e58391

@pablogsal
Copy link
Member

We still have:

test_python_calls_appear_in_the_stack_if_perf_activated (test.test_perf_profiler.TestPerfProfiler.test_python_calls_appear_in_the_stack_if_perf_activated) ... skipped "perf command doesn't work"
test_python_calls_do_not_appear_in_the_stack_if_perf_deactivated (test.test_perf_profiler.TestPerfProfiler.test_python_calls_do_not_appear_in_the_stack_if_perf_deactivated) ... skipped "perf command doesn't work"
test_python_calls_appear_in_the_stack_if_perf_activated (test.test_perf_profiler.TestPerfProfilerWithDwarf.test_python_calls_appear_in_the_stack_if_perf_activated) ... skipped "perf command doesn't work"
test_python_calls_do_not_appear_in_the_stack_if_perf_deactivated (test.test_perf_profiler.TestPerfProfilerWithDwarf.test_python_calls_do_not_appear_in_the_stack_if_perf_deactivated) ... skipped "perf command doesn't work"

so this is still not testing the perf DWARF integration because the kernel/perf version it's too old or has a bug. Check https://docs.python.org/3.14/howto/perf_profiling.html#how-to-work-without-frame-pointers

@corona10
Copy link
Member Author

so this is still not testing the perf DWARF integration because the kernel/perf version it's too old or has a bug. Check

STEP 3/5: RUN perf version
perf version 6.6.4

Yeah.. Thanks for catching this. let me check.

@zware
Copy link
Member

zware commented Aug 9, 2024

!buildbot Alpine

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @zware for commit b8573ea 🤖

The command will test the builders whose names match following regular expression: Alpine

The builders matched are:

  • AMD64 Alpine Linux PR

@zware
Copy link
Member

zware commented Aug 12, 2024

!buildbot Alpine

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @zware for commit b8573ea 🤖

The command will test the builders whose names match following regular expression: Alpine

The builders matched are:

  • AMD64 Alpine Linux PR

@pablogsal pablogsal added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 13, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @pablogsal for commit b8573ea 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants