This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2021-10-13.22:37:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634164671.53.0.467583124205.issue45439@roundup.psfhosted.org>
In-reply-to
Content
Using LTO, the PR 28893 *increases* the stack memory usage. It's the opposite :-)


PyObject_CallOneArg(): 672 bytes/call => 688 bytes/call (+16 bytes)
PyObject_CallNoArg(): 640 bytes/call => 672 bytes/call (+32 bytes)
_PyObject_CallNoArg(): 640 bytes/call => 672 bytes/call (+32 bytes)


clang with LTO:

    ./configure --with-lto CC=clang LD=lld LDFLAGS="-fuse-ld=lld"
    make

=== ref ===

$ ./python stack_overflow-4.py
test_python_call: 9187 calls before crash, stack: 912 bytes/call
test_python_getitem: 15868 calls before crash, stack: 528 bytes/call
test_python_iterator: 11901 calls before crash, stack: 704 bytes/call
test_callonearg: 12468 calls before crash, stack: 672 bytes/call
test_callnoargs: 13091 calls before crash, stack: 640 bytes/call
test_callnoargs_inline: 13092 calls before crash, stack: 640 bytes/call

=> total: 75607 calls, 4096 bytes

=== PR ===

$ ./python stack_overflow-4.py
test_python_call: 9186 calls before crash, stack: 912 bytes/call
test_python_getitem: 15400 calls before crash, stack: 544 bytes/call
test_python_iterator: 11384 calls before crash, stack: 736 bytes/call
test_callonearg: 12177 calls before crash, stack: 688 bytes/call
test_callnoargs: 12468 calls before crash, stack: 672 bytes/call
test_callnoargs_inline: 12467 calls before crash, stack: 672 bytes/call

=> total: 73082 calls, 4224 bytes
History
Date User Action Args
2021-10-13 22:37:51vstinnersetrecipients: + vstinner
2021-10-13 22:37:51vstinnersetmessageid: <1634164671.53.0.467583124205.issue45439@roundup.psfhosted.org>
2021-10-13 22:37:51vstinnerlinkissue45439 messages
2021-10-13 22:37:51vstinnercreate