FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-141770: Annotate anonymous mmap usage if "-X dev" is used by corona10 · Pull Request #142079 · python/cpython · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0e3933d
gh-141770: Annotate anonymous mmap only for debug build
corona10 Nov 28, 2025
8b7023e
Apply annotation feature to modules
corona10 Nov 29, 2025
816d962
Add NEWS.d
corona10 Nov 29, 2025
979ce02
nit
corona10 Nov 29, 2025
b3d8547
Update Include/internal/pycore_pymem.h
corona10 Nov 29, 2025
0c5a495
Address code review
corona10 Nov 29, 2025
e757dd9
Address code review
corona10 Nov 29, 2025
cb9509b
Change annotation prefix
corona10 Nov 30, 2025
855742b
nit
corona10 Nov 30, 2025
32cc007
Address code review
corona10 Dec 1, 2025
49b4f95
Apply suggestions from code review
corona10 Dec 2, 2025
1b88b75
Address code review
corona10 Dec 2, 2025
e2eedbc
Address code review
corona10 Dec 2, 2025
a680677
test
corona10 Dec 3, 2025
8ec4d73
Add Include/internal/pycore_mmap.h
corona10 Dec 3, 2025
c0e08b6
fix
corona10 Dec 3, 2025
e66e650
Update PC
corona10 Dec 3, 2025
b0ca751
Update
corona10 Dec 3, 2025
c9138de
Update Whats News
corona10 Dec 3, 2025
8f77e0d
Merge remote-tracking branch 'upstream/main' into gh-141770
corona10 Dec 4, 2025
8706fce
Address code review
corona10 Dec 4, 2025
8ce8281
lint
corona10 Dec 4, 2025
d71a744
Update
corona10 Dec 4, 2025
4dd1ee4
Address code review
corona10 Dec 4, 2025
fee757e
Apply suggestions from code review
corona10 Dec 5, 2025
a240b3c
Update Objects/obmalloc.c
corona10 Dec 5, 2025
805c539
Address code review
corona10 Dec 5, 2025
795d31c
Update Misc/NEWS.d/next/Core_and_Builtins/2025-11-29-18-14-28.gh-issu…
corona10 Dec 5, 2025
be4d550
Address code review
corona10 Dec 5, 2025
290864a
Address code review
corona10 Dec 5, 2025
b287e0c
nit
corona10 Dec 5, 2025
1619f95
Update Misc/NEWS.d/next/Core_and_Builtins/2025-11-29-18-14-28.gh-issu…
corona10 Dec 6, 2025
a1ad592
Update Include/internal/pycore_mmap.h
corona10 Dec 8, 2025
e4e4835
Update Modules/_ctypes/malloc_closure.c
corona10 Dec 8, 2025
0429a0a
Update Include/internal/pycore_mmap.h
corona10 Dec 8, 2025
File filter

Filter by extension

Filter by extension .c  (4) .h  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Victor Stinner <vstinner@python.org>
  • Loading branch information
corona10 and vstinner authored Dec 2, 2025
commit 49b4f95336b8daade9945902f814b1173e09c9ba
4 changes: 2 additions & 2 deletions Include/internal/pycore_pymem.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ extern "C" {
#endif

#if defined(Py_DEBUG) && defined(HAVE_PR_SET_VMA_ANON_NAME) && defined(__linux__)
#include <linux/prctl.h>
#include <sys/prctl.h>
# include <linux/prctl.h>
# include <sys/prctl.h>
#endif

// Try to get the allocators name set by _PyMem_SetupAllocators().
Expand Down
2 changes: 1 addition & 1 deletion Modules/mmapmodule.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1952,7 +1952,7 @@ new_mmap_object(PyTypeObject *type, PyObject *args, PyObject *kwdict)
PyErr_SetFromErrno(PyExc_OSError);
return NULL;
}
_PyAnnotateMemoryMap(m_obj->data, map_size, "cpython:mmap:new_mmap_object");
_PyAnnotateMemoryMap(m_obj->data, map_size, "cpython:mmap");
Comment thread
corona10 marked this conversation as resolved.
Resolved
m_obj->access = (access_mode)access;
return (PyObject *)m_obj;
}
Expand Down
2 changes: 1 addition & 1 deletion Python/jit.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jit_alloc(size_t size)
unsigned char *memory = mmap(NULL, size, prot, flags, -1, 0);
int failed = memory == MAP_FAILED;
if (!failed) {
_PyAnnotateMemoryMap(memory, size, "cpython:jit:jit_alloc");
_PyAnnotateMemoryMap(memory, size, "cpython:jit");
}
#endif
if (failed) {
Expand Down
2 changes: 1 addition & 1 deletion Python/perf_jit_trampoline.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ static void* perf_map_jit_init(void) {
close(fd);
return NULL; // Memory mapping failed
}
_PyAnnotateMemoryMap(perf_jit_map_state.mapped_buffer, page_size, "cpython:perf_jit_trampoline:perf_map_jit_init");
_PyAnnotateMemoryMap(perf_jit_map_state.mapped_buffer, page_size, "cpython:perf_jit_trampoline");
#endif

perf_jit_map_state.mapped_size = page_size;
Expand Down
2 changes: 1 addition & 1 deletion Python/perf_trampoline.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ new_code_arena(void)
perf_status = PERF_STATUS_FAILED;
return -1;
}
_PyAnnotateMemoryMap(memory, mem_size, "cpython:perf_trampoline:new_code_arena");
_PyAnnotateMemoryMap(memory, mem_size, "cpython:perf_trampoline");
void *start = &_Py_trampoline_func_start;
void *end = &_Py_trampoline_func_end;
size_t code_size = end - start;
Expand Down
Loading

Back | FazBrowse Home | New Git URL