[Python-Dev] Re: Custom memory profiler and PyTraceMalloc_Track

2022-02-15 Thread Sümer Cip
> In other words, the allocators are concerned about > memory, not tracing or anything else that can be done by overriding them. Ok I now understand that `tracemalloc`'s use of allocator APIs is just an implementation detail. Allocator APIs were used for tracing but they are not designed for

[Python-Dev] Custom memory profiler and PyTraceMalloc_Track

2022-02-15 Thread Sümer Cip
Hi everyone, I would like to ask a question about an issue that we faced regarding profiling memory usage: We have implemented a custom memory profiler using `PyMem_GetAllocator/PyMem_SetAllocator` APIs like `tracemalloc`. Right now, we are facing an issue with numpy: numpy seems to have its

[Python-Dev] Re: Hold multiple tracebacks per-object in tracemalloc

2019-11-20 Thread Sümer Cip
Thanks Victor, I have a better understanding of tracemalloc internals. On Tue, Nov 19, 2019 at 10:07 PM Victor Stinner wrote: > Hi, > > Le mar. 19 nov. 2019 à 18:33, Sümer Cip a écrit : > > First of all, I would like to thank for such a useful tool for debugging > memory i

[Python-Dev] Hold multiple tracebacks per-object in tracemalloc

2019-11-19 Thread Sümer Cip
this module only lately on tracemalloc, so please correct if a major piece is missing in my example or my understanding is wrong in some way. Thanks as always! -- Sümer Cip ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe

[Python-Dev] Getting function arguments of PyCFunctionObject

2019-10-18 Thread Sümer Cip
Python version to version and also I think there is no way of getting named arguments... I have been dealing with this for a while, so there might be unclear points in my explanation. I would really appreciate if anyone can help me on a correct direction on this. Thanks, Best Regards. -- Sümer Cip

Re: [Python-Dev] [RFC] PEP 418: Add monotonic time, performance counter and process time functions

2012-04-17 Thread Sümer Cip
for this functionality, ... -- Sümer Cip ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

[Python-Dev] CPU vs Wall time Profiling

2012-02-21 Thread Sümer Cip
Hi all, Is there a reason behind the fact that the Python profilers work with Wall time by default? There are OS-dependent ways to get the CPU time of a thread, and giving that choice to the user _somehow_ ( to use wall vs cpu time) might be a good feature? -- Sumer Cip

Re: [Python-Dev] CPU vs Wall time Profiling

2012-02-21 Thread Sümer Cip
The original reason was that the Unix wall clock was more accurate than its CPU clock. If that's changed we should probably (perhaps in a platform-dependent way) change the default to the most accurate clock available. Currently it seems clock_gettime() APIs have nanosecond resolution and

[Python-Dev] Improvements for Porting C Extension from 2 to 3

2011-03-03 Thread Sümer Cip
Hi, While porting a C extension from 2 to 3, I realized that there are some general cases which can be automated. For example, for my specific application (yappi - http://code.google.com/p/yappi/), all I need to do is following things: 1) define PyModuleDef 2) change PyString_AS_STRING calls to

Re: [Python-Dev] Improvements for Porting C Extension from 2 to 3

2011-03-03 Thread Sümer Cip
1) define PyModuleDef 2) change PyString_AS_STRING calls to _PyUnicode_AsString Aside: Please don't use private APIs in Python extensions. Esp. the above Unicode API is likely going to be phased out. You're better off, using PyUnicode_AsUTF8String() instead and then leaving the

Re: [Python-Dev] Improvements for Porting C Extension from 2 to 3

2011-03-03 Thread Sümer Cip
I'm not sure why what C-API is used in Python's extension modules needs to be anyway to you. I just tought it is a better programming practice to decrease/narrow inter modular usage of functions inside the whole dist. and also a good example for the other 3rd party C Extension developers. I

[Python-Dev] yappi - any thoughts?

2009-10-30 Thread Sümer Cip
Hi there, yappi(Yet Another Python Profiler) is a multithreaded profiler for 2.x series(do not know if it will work on 3k, not tested yet). I have done my best to make it efficient as possible.(details are under the technical bullet in the website). It is aimed for long-running programs, to