cpython/Python
Victor Stinner c6944e7edc Issue #28618: Make hot functions using __attribute__((hot))
When Python is not compiled with PGO, the performance of Python on call_simple
and call_method microbenchmarks depend highly on the code placement. In the
worst case, the performance slowdown can be up to 70%.

The GCC __attribute__((hot)) attribute helps to keep hot code close to reduce
the risk of such major slowdown. This attribute is ignored when Python is
compiled with PGO.

The following functions are considered as hot according to statistics collected
by perf record/perf report:

* _PyEval_EvalFrameDefault()
* call_function()
* _PyFunction_FastCall()
* PyFrame_New()
* frame_dealloc()
* PyErr_Occurred()
2016-11-11 02:13:35 +01:00
..
clinic Issue #27810: Rerun Argument Clinic on all modules 2016-09-09 20:00:13 -07:00
_warnings.c Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF 2016-04-10 18:12:01 +03:00
asdl.c replace PY_SIZE_MAX with SIZE_MAX 2016-09-07 09:26:18 -07:00
ast.c Issue #26182: Fix ia refleak in code that raises DeprecationWarning. 2016-11-08 16:54:18 -05:00
bltinmodule.c Issue #23722: Initialize __class__ from type.__new__() 2016-09-11 14:45:49 +10:00
ceval.c Issue #28618: Make hot functions using __attribute__((hot)) 2016-11-11 02:13:35 +01:00
ceval_gil.h replace Py_(u)intptr_t with the c99 standard types 2016-09-06 13:47:26 -07:00
codecs.c Issue #28510: Clean up decoding error handlers. 2016-10-23 09:44:50 +03:00
compile.c Issue #28257: Improved error message when pass a non-iterable as 2016-10-02 10:33:46 +03:00
condvar.h Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-09-07 12:03:06 +00:00
dtoa.c dtoa.c: remove code for platforms with 64-bit integers (#17884) 2016-09-06 12:44:21 -07:00
dup2.c
dynamic_annotations.c
dynload_aix.c PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
dynload_dl.c Issue #24268: Fix import naming when loading extension modules. Patch by Petr Viktorin. 2015-05-23 14:13:41 -07:00
dynload_hpux.c Issue #24268: Fix import naming when loading extension modules. Patch by Petr Viktorin. 2015-05-23 14:13:41 -07:00
dynload_next.c Issue #24268: Fix import naming when loading extension modules. Patch by Petr Viktorin. 2015-05-23 14:13:41 -07:00
dynload_shlib.c PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
dynload_stub.c
dynload_win.c Issue #25923: Added more const qualifiers to signatures of static and private functions. 2015-12-25 20:01:53 +02:00
errors.c Issue #28618: Make hot functions using __attribute__((hot)) 2016-11-11 02:13:35 +01:00
fileutils.c Fix check_force_ascii() 2016-09-09 23:11:52 -07:00
formatter_unicode.c merge 3.5 (#28119) 2016-09-13 22:46:15 -07:00
frozen.c Issue #26647: Python interpreter now uses 16-bit wordcode instead of bytecode. 2016-05-24 09:15:14 +03:00
frozenmain.c Issue #5319: New Py_FinalizeEx() API to exit with status 120 on failure 2015-11-30 03:18:29 +00:00
future.c Add ast.Constant 2016-01-26 00:40:57 +01:00
getargs.c va_end() all va_copy()ed va_lists. 2016-09-21 11:37:27 +02:00
getcompiler.c
getcopyright.c 2016 will be another year of writing copyrighted code 2016-01-01 10:23:45 -06:00
getopt.c
getplatform.c
getversion.c
graminit.c Issue #28008: Implement PEP 530 -- asynchronous comprehensions. 2016-09-09 10:36:01 -07:00
import.c Fix potential NULL pointer dereference in _imp_create_builtin 2016-09-09 00:25:03 +02:00
importdl.c Issue #25923: Added the const qualifier to static constant arrays. 2015-12-25 19:53:18 +02:00
importdl.h PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
importlib.h Issue #28517: Fixed of-by-one error in the peephole optimizer that caused 2016-10-25 09:30:43 +03:00
importlib_external.h Issue #28517: Fixed of-by-one error in the peephole optimizer that caused 2016-10-25 09:30:43 +03:00
makeopcodetargets.py makeopcodetargets.py: we need to import Lib/opcode.py 2016-03-26 01:04:37 +01:00
marshal.c Issue #28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly optimize memcpy(). 2016-09-13 20:22:02 +02:00
modsupport.c va_end() all va_copy()ed va_lists. 2016-09-21 11:37:27 +02:00
mysnprintf.c
mystrtoul.c Issue #25923: Added the const qualifier to static constant arrays. 2015-12-25 19:53:18 +02:00
opcode_targets.h Issue #28257: Improved error message when pass a non-iterable as 2016-10-02 10:33:46 +03:00
peephole.c Issue #28517: Fixed of-by-one error in the peephole optimizer that caused 2016-10-25 09:30:43 +03:00
pyarena.c
pyctype.c
pyfpe.c Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
pyhash.c Issue #28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly optimize memcpy(). 2016-09-13 20:22:02 +02:00
pylifecycle.c Don't run garbage collection on interpreter exit if it was explicitly disabled 2016-09-09 21:47:46 -07:00
pymath.c Issue 24366: Indent code (thanks to li4ick for reporting). 2015-06-02 18:53:46 -04:00
pystate.c remove ceval timestamp support 2016-09-09 14:57:58 -07:00
pystrcmp.c
pystrhex.c Silence a gcc "may be used uninitialized" compiler warning. Not true. 2015-04-25 23:51:39 -07:00
pystrtod.c Issue #26331: Implement the parsing part of PEP 515. 2016-09-09 14:57:09 -07:00
Python-ast.c Issue #24098: Fixed possible crash when AST is changed in process of 2016-10-07 21:55:49 +03:00
pythonrun.c Avoid calling functions with an empty string as format string 2016-09-05 18:16:01 -07:00
pytime.c Issue #28148: Stop using localtime() and gmtime() in the time module. 2016-09-28 17:31:35 -04:00
random.c (Merge 3.5) Catch EPERM error in py_getrandom() 2016-09-20 22:49:52 +02:00
README Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
sigcheck.c
strdup.c
structmember.c replace PY_LONG_LONG with long long 2016-09-06 10:46:49 -07:00
symtable.c Issue #28100: Refactor error messages, patch by Ivan Levkivskyi 2016-09-23 20:26:30 +02:00
sysmodule.c Use PyThreadState_GET() in performance critical code 2016-11-11 01:43:56 +01:00
thread.c Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5 2015-11-02 04:04:57 +00:00
thread_foobar.h
thread_nt.h replace PY_LONG_LONG with long long 2016-09-06 10:46:49 -07:00
thread_pthread.h Issue #22206: Using pthread, PyThread_create_key() now sets errno to ENOMEM and 2014-08-17 22:11:06 +02:00
traceback.c Issue #23782: Fixed possible memory leak in _PyTraceback_Add() and exception 2016-10-18 13:26:25 +03:00
wordcode_helpers.h Issue #27129: Replaced wordcode related magic constants with macros. 2016-09-11 13:48:15 +03:00

Miscellaneous source files for the main Python shared library