[issue40609] _tracemalloc: remove pointer_t type

2020-05-13 Thread STINNER Victor


STINNER Victor  added the comment:

I modified _Py_hashtable_t to remove key_size and data_size: keys are now 
always "void *" and values are now always "void *".

See also bpo-40602: Move Modules/hashtable.h to 
Include/internal/pycore_hashtable.h.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5b0a30354d8a8bb39a05ce10ca4f5c78b729f25b by Victor Stinner in 
branch 'master':
bpo-40609: _Py_hashtable_t values become void* (GH-20065)
https://github.com/python/cpython/commit/5b0a30354d8a8bb39a05ce10ca4f5c78b729f25b


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19374
pull_request: https://github.com/python/cpython/pull/20065

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d95bd4214c2babe851b02562d973d60c02e639b7 by Victor Stinner in 
branch 'master':
bpo-40609: _tracemalloc allocates traces (GH-20064)
https://github.com/python/cpython/commit/d95bd4214c2babe851b02562d973d60c02e639b7


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19373
pull_request: https://github.com/python/cpython/pull/20064

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2d0a3d682f699cce8db6e30981d41d9125318726 by Victor Stinner in 
branch 'master':
bpo-40609: Add destroy functions to _Py_hashtable (GH-20062)
https://github.com/python/cpython/commit/2d0a3d682f699cce8db6e30981d41d9125318726


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19371
pull_request: https://github.com/python/cpython/pull/20062

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f9b3b582b86b9cce8d69ec7d03d716ec81c8264a by Victor Stinner in 
branch 'master':
bpo-40609: Remove _Py_hashtable_t.key_size (GH-20060)
https://github.com/python/cpython/commit/f9b3b582b86b9cce8d69ec7d03d716ec81c8264a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19368
pull_request: https://github.com/python/cpython/pull/20060

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 9e2ca1742076169089b818d0883688a2ddd9964a by Victor Stinner in 
branch 'master':
bpo-40609: Rewrite how _tracemalloc handles domains (GH-20059)
https://github.com/python/cpython/commit/9e2ca1742076169089b818d0883688a2ddd9964a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +19367
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20059

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40609] _tracemalloc: remove pointer_t type

2020-05-12 Thread STINNER Victor


New submission from STINNER Victor :

In bpo-26588, I modified the _tracemalloc module to support tracing memory 
allocations in multiple "domains" for numpy. I modified hashtable.c to support 
keys larger than void*, and I modified _tracemalloc.c to use a new pointer_t 
structure which is made of (domain: unsigned int, ptr: void*).

These changes made hashtable.c way more complicated than what it should be. I 
would like to reuse hashtable.c in more places. I am working on a change to 
remove the pointer_t type from _tracemalloc.c, and instead use a hash table for 
traces of domains other than the default domain (0). The new hash table maps a 
domain to a hash table: traces of a domain.

tracemalloc_traces remains the default hash table for traces of the default 
domain. Since it's the most common case, it doesn't go through the new hash 
table.

--
components: Library (Lib)
messages: 368747
nosy: vstinner
priority: normal
severity: normal
status: open
title: _tracemalloc: remove pointer_t type
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com