cpython/Include
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
..
Python-ast.h Issue #28008: Implement PEP 530 -- asynchronous comprehensions. 2016-09-09 10:36:01 -07:00
Python.h issue27186: add C version of os.fspath(); patch by Jelle Zijlstra 2016-06-04 12:06:26 -07:00
abstract.h Issues #25909, #28211: Restored correct documentation of PyMapping_Items, 2016-09-26 20:53:27 +03:00
accu.h Issue #14387 : undefine 'small' so that it doesn't clash with Windows headers. 2012-03-22 23:10:37 +00:00
asdl.h Add ast.Constant 2016-01-26 00:40:57 +01:00
ast.h Close #11619: The parser and the import machinery do not encode Unicode 2013-08-26 22:28:21 +02:00
bitset.h
bltinmodule.h these builtins have to be initialized 2009-05-09 18:10:51 +00:00
boolobject.h
bytearrayobject.h fix comment 2013-10-05 16:28:04 -04:00
bytes_methods.h Issue #26765: Moved common code and docstrings for bytes and bytearray methods 2016-05-04 22:23:26 +03:00
bytesobject.h Issue 28128: Print out better error/warning messages for invalid string escapes. Backport to 3.6. 2016-10-31 14:46:26 -04:00
cellobject.h Merge branches/pep-0384. 2010-12-03 20:14:31 +00:00
ceval.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
classobject.h Merge branches/pep-0384. 2010-12-03 20:14:31 +00:00
code.h Issue #27129: Replaced wordcode related magic constants with macros. 2016-09-11 13:48:15 +03:00
codecs.h Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5 2015-11-02 04:04:57 +00:00
compile.h PEP 479: Change StopIteration handling inside generators. 2015-05-09 11:44:30 -04:00
complexobject.h Issue #21803: remove macro indirections in complexobject.h 2014-07-07 18:49:30 -04:00
datetime.h Closes issue #24773: Implement PEP 495 (Local Time Disambiguation). 2016-07-22 18:47:04 -04:00
descrobject.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
dictobject.h Issue #28544: Pass `PyObject*` to _PyDict_Pop, not `PyDictObject*` 2016-10-28 19:01:21 -04:00
dtoa.h Issue #14521: Make result of float('nan') and float('-nan') more consistent across platforms. Further, don't rely on Py_HUGE_VAL for float('inf'). 2012-04-29 15:31:56 +01:00
dynamic_annotations.h fix instances of consecutive articles (closes #23221) 2015-01-13 09:17:24 -05:00
enumobject.h
errcode.h Issue #12705: Raise SyntaxError when compiling multiple statements as single interactive statement 2012-01-19 01:08:41 -06:00
eval.h Merge branches/pep-0384. 2010-12-03 20:14:31 +00:00
fileobject.h Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529) 2016-09-08 10:35:16 -07:00
fileutils.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
floatobject.h Issue #11734: Add support for IEEE 754 half-precision floats to the struct module. Original patch by Eli Stevens. 2016-09-03 17:21:29 +01:00
frameobject.h fix indentation of comment 2016-06-03 22:37:48 -07:00
funcobject.h Add _PyObject_FastCallKeywords() 2016-09-09 12:36:44 -07:00
genobject.h Issue #23996: Added _PyGen_SetStopIterationValue for safe raising 2016-11-06 18:47:03 +02:00
graminit.h Issue #27985: Implement PEP 526 -- Syntax for Variable Annotations. 2016-09-08 20:50:03 -07:00
grammar.h properly free memory in pgen 2016-09-18 18:00:25 -07:00
import.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
intrcheck.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
iterobject.h Rename _PyIter_GetBuiltin to _PyObject_GetBuiltin, and do not include it in the stable ABI. 2012-04-05 00:04:20 +02:00
listobject.h Issue #26778: Fixed "a/an/and" typos in code comment and documentation. 2016-04-17 08:32:47 +03:00
longintrepr.h replace Python aliases for standard integer types with the standard integer types (#17884) 2016-09-06 13:24:00 -07:00
longobject.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
marshal.h Issue #1772673: The type of `char*` arguments now changed to `const char*`. 2013-10-19 21:03:34 +03:00
memoryobject.h Closes #22668: Merge from 3.4. 2015-01-29 14:29:51 +01:00
metagrammar.h
methodobject.h Issue #27810: Exclude METH_FASTCALL from the stable API 2016-09-12 15:55:21 +02:00
modsupport.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
moduleobject.h Issue #27782: Fix m_methods handling in multiphase init 2016-08-21 17:41:56 +10:00
namespaceobject.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
node.h Removed trailing tabs. 2015-03-21 09:25:53 +02:00
object.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
objimpl.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
odictobject.h Issue #24254: Drop cls.__definition_order__. 2016-09-08 15:11:11 -07:00
opcode.h Issue #28257: Improved error message when pass a non-iterable as 2016-10-02 10:33:46 +03:00
osdefs.h Issue #22591: Drop support of MS-DOS 2014-10-10 11:55:41 +02:00
osmodule.h issue27186: add C version of os.fspath(); patch by Jelle Zijlstra 2016-06-04 12:06:26 -07:00
parsetok.h Issue #1772673: The type of `char*` arguments now changed to `const char*`. 2013-10-19 21:03:34 +03:00
patchlevel.h Start 3.6.0b4 2016-11-01 00:35:39 -04:00
pgen.h
pgenheaders.h prefix freegrammar (closes #28413) 2016-10-10 23:21:02 -07:00
py_curses.h Issue #25923: Added the const qualifier to static constant arrays. 2015-12-25 19:53:18 +02:00
pyarena.h Merge branches/pep-0384. 2010-12-03 20:14:31 +00:00
pyatomic.h replace Py_(u)intptr_t with the c99 standard types 2016-09-06 13:47:26 -07:00
pycapsule.h Merged revisions 88517 via svnmerge from 2011-02-22 23:43:57 +00:00
pyctype.h Try to fix linking failures under Windows 2011-10-04 14:43:47 +02:00
pydebug.h Issue #1602: Windows console doesn't input or print Unicode (PEP 528) 2016-08-30 21:22:36 -07:00
pydtrace.d DTrace support: function calls, GC activity, line execution 2016-09-09 17:37:37 -07:00
pydtrace.h mark dtrace stubs as static inline; remove stubs 2016-10-20 22:37:00 -07:00
pyerrors.h Issue #28410: Added _PyErr_FormatFromCause() -- the helper for raising 2016-10-21 17:09:17 +03:00
pyexpat.h Issue #13612: handle unknown encodings without a buffer overflow. 2013-05-25 05:25:48 -07:00
pyfpe.h remove trailing whitespace 2016-09-19 22:16:36 -07:00
pygetopt.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
pyhash.h replace Python aliases for standard integer types with the standard integer types (#17884) 2016-09-06 13:24:00 -07:00
pylifecycle.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
pymacconfig.h Minor spelling fixes 2016-08-20 08:03:06 +00:00
pymacro.h Add Py_MEMBER_SIZE macro 2016-09-08 09:33:56 -07:00
pymath.h Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-09-07 12:03:06 +00:00
pymem.h replace Py_(u)intptr_t with the c99 standard types 2016-09-06 13:47:26 -07:00
pyport.h Issue #28618: Make hot functions using __attribute__((hot)) 2016-11-11 02:13:35 +01:00
pystate.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
pystrcmp.h
pystrhex.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
pystrtod.h Issue #26331: Implement the parsing part of PEP 515. 2016-09-09 14:57:09 -07:00
pythonrun.h Merge typo fixes from 3.5 2016-05-08 14:02:35 +00:00
pythread.h stop using Py_LL and Py_ULL 2016-09-18 18:12:21 -07:00
pytime.h Issue #28148: Stop using localtime() and gmtime() in the time module. 2016-09-28 17:31:35 -04:00
rangeobject.h
setobject.h Clarify comments on setentry invariants. 2015-08-01 15:21:41 -07:00
sliceobject.h Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
structmember.h require a long long data type (closes #27961) 2016-09-05 17:44:18 -07:00
structseq.h Issue #18520: Add a new PyStructSequence_InitType2() function, same than 2013-07-22 22:24:54 +02:00
symtable.h Issue #28003: Implement PEP 525 -- Asynchronous Generators. 2016-09-08 22:01:51 -07:00
sysmodule.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
token.h PEP 0492 -- Coroutines with async and await syntax. Issue #24017. 2015-05-11 22:57:16 -04:00
traceback.h Issue #26900: Excluded underscored names and other private API from limited API. 2016-09-11 11:03:14 +03:00
tupleobject.h Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues 2012-06-22 14:55:41 -04:00
typeslots.h Issue 24365: Conditionalize PEP 489 additions to the stable ABI 2015-06-02 19:06:47 -04:00
ucnhash.h Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
unicodeobject.h Issue 28128: Print out better error/warning messages for invalid string escapes. Backport to 3.6. 2016-10-31 14:46:26 -04:00
warnings.h On ResourceWarning, log traceback where the object was allocated 2016-03-19 01:03:51 +01:00
weakrefobject.h Closes #13867: remove untrue comment about PyWeakref_Check(). 2013-10-08 19:50:26 +02:00