This changelog summarizes major changes between Truffle Tools versions.
- GR-72122:
--cpusampler.DumpIntervaland--cpusampler.ResetAfterIntervalDumpoptions were added to dump the sampler output at a specified interval, optionally clearing all sampler data after each dump. Interval-based dumping is disabled by default; the sampler output is dumped only at the end.CPUSampler#addProcessSampleListenerwas added to allow users to receive notifications when sampling results are processed. The new interval-based dumping feature uses this API internally.
- GR-72763 PR-12760 Enhanced GraalVM Insight to allow tracking reads and writes of local variables
- GR-73816: Restrict Chrome inspector to binding only to localhost.
- GR-74436: Chrome Inspector now writes informational messages, including the debugger WebSocket address, to the standard output stream instead of the error stream.
- GR-52742:
CPUSamplerno longer guarantees to keep all contexts on the engine alive. As a resultCPUSampler#getData()is deprecated and may not return data for all contexts on the engine. The contexts that were already collected by GC won't be in the returned map.CPUSamplerData#getContext()is also deprecated and returns null if the context was already collected. - GR-52742:
CPUSamplerData#getDataList()was introduced and returns all data collected by the sampler as a list ofCPUSamplerData. For each context on the engine, including the ones that were already collected, there is a corresponding element in the list.CPUSamplerData#getContextIndex()returns the index of the data in the list. - GR-53035: Added CPUSampler support for gathering any async stack trace information for each sample, enabled by default. Introduced configuration option
--cpusampler.GatherAsyncStackTrace=true|false, and corresponding APICPUSampler#setGatherAsyncStackTrace, to allow disabling async stack trace sampling again. - GR-53035:
StackTraceEntry#isInlined()is no longer deprecated. - GR-54751:
--inspect.SuspensionTimeoutoption added to set a timeout of a debugger suspension. The debugger session is disconnected after the timeout expires.
- GR-41407: Added new option
--dap.SourcePathto allow to resolve sources with relative paths.
- GR-40233: The interpretation of the
depthparameter in Insight heap dumping was off by one and was applied to primitive values as well. This is now corrected to match the documentation.
- GR-37442: Added new options
--heap.cacheSize=<int>and--heap.cacheReplacement=flush|lruto enable memory cache in Heap Dumping via Insight. - GR-37442: Added new method
flush()to heap dumping object to flush cached events to the heap dump file.
- Dumping JavaScript
ArrayasObject[]into the.hproffile - HeapDump.newArray to start building an array
- GR-33316 Remove deprecated cpusampler APIs and CLIs
- GR-34745 Allow short-hand usage of the
--cpusamplerflag to enable and specify output. For example,--cpusampler=calltreeis equivalent to--cpusampler --cpusampler.Output=calltree. NOTE: Since the flame graph output is unreadable in the terminal--cpusampler=flamegraphis equivalent to--cpusampler --cpusampler.Output=flamegraph -cpusampler.OutputFile=flamegraph.svg. - GR-34209 Added overload of
CPUSampler.takeSamplewith a timeout. By default samples time out when the configured period is exceeded.
- Dumping JavaScript
ArrayasObject[]into the.hproffile - HeapDump.newArray to start building an array
- Reimplemented CPUSampler to use the Truffle language safepoints thus deprecating several API functions.
- Added new option
--cpusampler.SampleContextInitializationwhich includes code executed during context initialization in the general sampling profile instead of grouping it into a single entry. - Default CLI output of CPUSampler was simplified to not include compiled times.
- CPUSampler APIs to distinguish compiled from interpreted samples were replaced by a more general API that supports an arbitrary number of compilation tiers.
- Added the --cpusampler.ShowTiers option that shows time spend in each optimization tier.
- Support for hash interoperability in Insight - no need to use
Truffle::Interop.hash_keys_as_membersanymore - Cooperative heap dumping when embedding Insight into Java applications
- Add an SVG flamegraph output format to the CPUSampler, use option
--cpusampler.OutputFormat=flamegraph.
- Use
--heap.dump=/path/to/file/to/generate.hprofto enable Heap Dumping via Insight - Insight object API provides access to
charIndex,charLengthandcharEndIndex
--insightoption is no longer considered experimental- Use
ctx.iterateFramesto access whole stack and its variables - Embedders can inject additional objects into Insight scripts
- GraalVM Insight Maven artifact is now
org.graalvm.tools:insight:20.3.0 - GraalVM Insight can intercept execution and modify return values
- GraalVM Insight can modify values of local variables
- Write GraalVM Insight scripts in Python
- GraalVM Insight can access local variables in C, C++ and other LLVM languages
- GraalVM Insight is the new name for the former T-Trace technology
- Access to source location (see
line,column, etc.) andsourceFilterselector in Insight agent object API - Embedding Insight into own application is now easily done via Graal SDK
- Apply Insight scripts C/C++/Julia & co. code - e.g. hack into C with JavaScript!
- Better error handling - e.g. propagation of errors from Insight scripts to application code
- Hack your Insight scripts in R!
- Introducing GraalVM Insight - a multipurpose, flexible tool for instrumenting and monitoring applications at full speed.
- Added a CLI code coverage tool for truffle languages. Enabled with
--coverage. See--help:toolsfor more details.