Skip to content

Commit 49b4f95

Browse files
corona10vstinner
andauthored
Apply suggestions from code review
Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent 32cc007 commit 49b4f95

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

Include/internal/pycore_pymem.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ extern "C" {
1212
#endif
1313

1414
#if defined(Py_DEBUG) && defined(HAVE_PR_SET_VMA_ANON_NAME) && defined(__linux__)
15-
#include <linux/prctl.h>
16-
#include <sys/prctl.h>
15+
# include <linux/prctl.h>
16+
# include <sys/prctl.h>
1717
#endif
1818

1919
// Try to get the allocators name set by _PyMem_SetupAllocators().

Modules/mmapmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1952,7 +1952,7 @@ new_mmap_object(PyTypeObject *type, PyObject *args, PyObject *kwdict)
19521952
PyErr_SetFromErrno(PyExc_OSError);
19531953
return NULL;
19541954
}
1955-
_PyAnnotateMemoryMap(m_obj->data, map_size, "cpython:mmap:new_mmap_object");
1955+
_PyAnnotateMemoryMap(m_obj->data, map_size, "cpython:mmap");
19561956
m_obj->access = (access_mode)access;
19571957
return (PyObject *)m_obj;
19581958
}

Python/jit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jit_alloc(size_t size)
7272
unsigned char *memory = mmap(NULL, size, prot, flags, -1, 0);
7373
int failed = memory == MAP_FAILED;
7474
if (!failed) {
75-
_PyAnnotateMemoryMap(memory, size, "cpython:jit:jit_alloc");
75+
_PyAnnotateMemoryMap(memory, size, "cpython:jit");
7676
}
7777
#endif
7878
if (failed) {

Python/perf_jit_trampoline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ static void* perf_map_jit_init(void) {
10861086
close(fd);
10871087
return NULL; // Memory mapping failed
10881088
}
1089-
_PyAnnotateMemoryMap(perf_jit_map_state.mapped_buffer, page_size, "cpython:perf_jit_trampoline:perf_map_jit_init");
1089+
_PyAnnotateMemoryMap(perf_jit_map_state.mapped_buffer, page_size, "cpython:perf_jit_trampoline");
10901090
#endif
10911091

10921092
perf_jit_map_state.mapped_size = page_size;

Python/perf_trampoline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ new_code_arena(void)
291291
perf_status = PERF_STATUS_FAILED;
292292
return -1;
293293
}
294-
_PyAnnotateMemoryMap(memory, mem_size, "cpython:perf_trampoline:new_code_arena");
294+
_PyAnnotateMemoryMap(memory, mem_size, "cpython:perf_trampoline");
295295
void *start = &_Py_trampoline_func_start;
296296
void *end = &_Py_trampoline_func_end;
297297
size_t code_size = end - start;

0 commit comments

Comments
 (0)