- 'print' statements
- Querying (/proc, /sys etc)
- Tracing (strace/ltrace)
- Valgrind (memwatch)
- GDB
at: https://linoxide.com/linux-how-to/user-space-debugging-tools-linux/
A mess is not a technical debt. A mess is just a mess. Technical debt decisions are made based on real project constraints. They are risky, but they can be beneficial. The decision to make a mess is never rational, is always based on laziness and unprofessionalism, and has no chance of paying of in the future. A mess is always a loss. (Uncle Bob)
I agree with Uncle Bob that this is usually a reckless debt, because people underestimate where the DesignPayoffLine is.
isThreadCpuTimeSupported()
method can be used to determine if a Java virtual machine supports measuring of the CPU time for any thread. The isCurrentThreadCpuTimeSupported()
method can be used to determine if a Java virtual machine supports measuring of the CPU time for the current thread. A Java virtual machine implementation that supports CPU time measurement for any thread will also support that for the current thread.isThreadCpuTimeEnabled()
and setThreadCpuTimeEnabled(boolean)
methods can be used to test if CPU time measurement is enabled and to enable/disable this support respectively. Enabling thread CPU measurement could be expensive in some Java virtual machine implementations.For starters, think of memory leakage as a disease and Java’s OutOfMemoryError (OOM, for brevity) as a symptom. But as with any disease, not all OOMs necessarily imply memory leaks: an OOM can occur due to the generation of a large number of local variables or other such events. On the other hand, not all memory leaks necessarily manifest themselves as OOMs, especially in the case of desktop applications or client applications (which aren’t run for very long without restarts).
Think of memory leakage as a disease and the OutOfMemoryError as a symptom. But not all OutOfMemoryErrors imply memory leaks, and not all memory leaks manifest themselves as OutOfMemoryErrors.