Releases: plasma-umass/scalene
Releases · plasma-umass/scalene
Improved memory profiling, new features, bugfixes
Overhauled memory attribution logic:
- uses Python's custom memory management APIs to efficiently disambiguate native vs. Python memory allocations, supplanting the prior approach that employed periodic call stack sampling.
- performs immediate lookup of the location in source code responsible for allocation/deallocation, reducing the "smearing" effect in attributions previously caused by delayed attribution.
- computes average memory consumption (rather than total) for each line of code (using the novel technique of "one-shot" tracing); lines executed many times no longer appear to have consumed large amounts of memory.
- no longer reports negative memory growth from output, caused by lines freeing more than allocating, which has been a source of confusion for some users.
- this release also resolves a memory leak.
Overhauled internal signal handling:
- uses signal actors, an approach based on actors that decouples signal handling logic from the main thread, avoiding the risk of races and deadlocks and simplifying logic
Bug fixes:
- fixed missing handling of
pynvml.NVMLError_NotSupportedexception (issue #262); - fixed issue cleaning up after profiling multiprocessor and multithreaded programs;
- fixed issue not accounting for elapsed time when zero frames were recorded (issue #269).
New features:
- added JSON output option (
--json); - added programmatic profile control (
scalene_profiler.start()andscalene_profiler.stop()).
Miscellaneous:
- improved documentation.
Note: this release is for MacOS and Linux only.
Windows bugfix release
Fixes Windows-specific bug introduced in 1.3.11 leading to empty outputs.
With this release, scalene on Windows now requires python 3.8 or newer.
Bugfix release for python compatibility
Fixed inadvertent use of signal.raise_signal, which isn't available in Python 3.7.
Adds Windows wheels to pypi
This release adds a Windows wheel to pypi, making it a C/C++ development environment unnecessary for installation.
Bugfix release for all platforms
- Fixes
pip installfor Windows - Fixes
@profilefunctionality
Bugfix release
- fixed AttributeError bug running with
--cpu-only;
Bug fixes and new wheels
- fixed synchronization and multiprocessing support for
--profile-interval; - fixed certain profiling data possibly being included when profiling was turned off;
- wheels (binary builds) now available from pypi for Linux (x86_64) and MacOS (x86_64 and M1);
Bugfix for Mac
Fixes a bug exposed on Mac OS X when using packages that include SQLite.
GPU profiling, suspend and resume profiling, improved Jupyter support
This release includes the following major new features:
- GPU profiling. If your system has an nvidia GPU, the profiler will automatically do line-level GPU utilization profiling (just like it already does for CPU).
- Suspend/resume. When Scalene is profiling a program launched in the background (via
&), you can now suspend and resume profiling. To suspend profiling of pid12345(Scalene will print the pid when launched in the background):python3 -m scalene.profile --off --pid 12345. To resume profiling:python3 -m scalene.profile --on --pid 12345. - Improved Jupyter support. Scalene now indicates in its profiles which Jupyter cell a function was defined in, as in
[5]. - Various bug fixes that improve Scalene's robustness, especially when profiling code using multithreaded libraries like
numpy.
Major update, support and features
- Jupyter support (currently CPU profiling only); use
%scrunor%%scalene - Function summaries: sorted list of functions by CPU time
- Memory consumption: reports top K lines allocating the most memory
- Reports memory growth over time (indicating possible leaks)
- Line-level memory leak detection "for free"
- Full
multiprocessingsupport - Adds
--profile-onlyflag to restrict profiling to files that contain the given string - Massive refactoring and cleanup of codebase