Ruben Ayrapetyan/SRR-Compiler Lab/./삼성전자 [Tue, 19 Sep 2017 11:55:45 +0000 (14:55 +0300)]
Merge pull request #19 from dotnet/build-from-scrath
Include missing header for PATH_MAX
Sung-Jae Lee [Tue, 19 Sep 2017 10:38:35 +0000 (19:38 +0900)]
include missing header for PATH_MAX
Ruben Ayrapetyan/SRR-Compiler Lab/./삼성전자 [Fri, 15 Sep 2017 19:46:44 +0000 (22:46 +0300)]
Merge pull request #18 from dotnet/calculate-per-managed-type-consumption
Calculate and visualize statistics of memory consumption per managed type
Andrey Kvochko [Fri, 15 Sep 2017 19:34:09 +0000 (22:34 +0300)]
Handle nested classes
Andrey Kvochko [Fri, 15 Sep 2017 19:34:04 +0000 (22:34 +0300)]
Handle multidimensional arrays
Andrey Kvochko [Fri, 15 Sep 2017 19:33:59 +0000 (22:33 +0300)]
Array object support
Andrey Kvochko [Fri, 15 Sep 2017 19:33:54 +0000 (22:33 +0300)]
Format types differently from methods
Andrey Kvochko [Fri, 15 Sep 2017 19:33:49 +0000 (22:33 +0300)]
Trace type name upon object allocation
Ruben Ayrapetyan/SRR-Compiler Lab/./삼성전자 [Fri, 15 Sep 2017 19:25:30 +0000 (22:25 +0300)]
Merge pull request #17 from dotnet/fix-bytes-amount-divisors
Fix visualization of memory consumption values
Ruben Ayrapetyan [Fri, 15 Sep 2017 19:23:05 +0000 (22:23 +0300)]
Fix visualization of memory consumption values (use 2^10 instead of 10^3 as divisor for bytes -> kilobytes -> megabytes -> etc. calculation).
Ruben Ayrapetyan/SRR-Compiler Lab/./삼성전자 [Fri, 15 Sep 2017 19:22:54 +0000 (22:22 +0300)]
Merge pull request #16 from dotnet/fix-relative-paths-in-profiler-build-script
Fix handling of relative paths in build script of managed profiler module
Ruben Ayrapetyan [Fri, 15 Sep 2017 19:19:36 +0000 (22:19 +0300)]
Fix handling of relative paths in profiler's build.sh
Ruben Ayrapetyan/SRR-Compiler Lab/./삼성전자 [Fri, 15 Sep 2017 19:13:22 +0000 (22:13 +0300)]
Merge pull request #15 from dotnet/show-coreclr-consumption
Calculate and show CoreCLR and non-CoreCLR memory consumption
Gleb Balykov [Fri, 15 Sep 2017 19:04:42 +0000 (22:04 +0300)]
Add logging of CoreCLR/non-CoreCLR memory consumption parts (turned on with --show-coreclr option)
Ruben Ayrapetyan/SRR-Compiler Lab/./삼성전자 [Fri, 15 Sep 2017 19:02:44 +0000 (22:02 +0300)]
Merge pull request #14 from dotnet/scripts
Add scripts for profiling Tizen .NET applications
Gleb Balykov [Fri, 15 Sep 2017 19:00:08 +0000 (22:00 +0300)]
Add scripts for tracing Tizen .NET applications.
Ruben Ayrapetyan/SRR-Compiler Lab/./삼성전자 [Fri, 15 Sep 2017 18:56:19 +0000 (21:56 +0300)]
Merge pull request #13 from dotnet/track-managed-memory
Track managed memory consumption
Ruben Ayrapetyan [Fri, 15 Sep 2017 18:50:00 +0000 (21:50 +0300)]
Fix build of profiler.
Ruben Ayrapetyan [Fri, 15 Sep 2017 18:49:55 +0000 (21:49 +0300)]
Calculate and visualize number of allocations that were not freed.
Ruben Ayrapetyan [Fri, 15 Sep 2017 18:49:50 +0000 (21:49 +0300)]
Refine UI.
Ruben Ayrapetyan [Fri, 15 Sep 2017 18:49:45 +0000 (21:49 +0300)]
Show managed memory consumption in GUI.
Ruben Ayrapetyan [Fri, 15 Sep 2017 18:49:40 +0000 (21:49 +0300)]
Trace managed heap allocations and garbage collections.
Ruben Ayrapetyan [Fri, 15 Sep 2017 18:49:35 +0000 (21:49 +0300)]
Speed up parsing by skipping unused data for each display mode.
Ruben Ayrapetyan/SRR-Compiler Lab/./삼성전자 [Fri, 15 Sep 2017 18:19:48 +0000 (21:19 +0300)]
Merge pull request #12 from dotnet/managed-call-stacks
Support tracing and visualization of managed call stacks
Ruben Ayrapetyan [Fri, 15 Sep 2017 18:15:51 +0000 (21:15 +0300)]
Use '.' instead of '::' for dividing managed class and function names.
Ruben Ayrapetyan [Fri, 15 Sep 2017 18:14:06 +0000 (21:14 +0300)]
Support --hide-unmanaged-stacks option.
Ruben Ayrapetyan [Fri, 15 Sep 2017 18:14:01 +0000 (21:14 +0300)]
Fix performance of stack tracing.
Ruben Ayrapetyan [Fri, 15 Sep 2017 18:13:56 +0000 (21:13 +0300)]
Fix profiler module.
- improve performance;
- fix maximum name length.
Andrey Kvochko [Fri, 15 Sep 2017 15:47:31 +0000 (18:47 +0300)]
Support managed call stacks tracking.
Ruben Ayrapetyan/SRR-Compiler Lab/./삼성전자 [Fri, 15 Sep 2017 15:24:35 +0000 (18:24 +0300)]
Merge pull request #11 from dotnet/visualization-improvements
GUI improvements
Ruben Ayrapetyan [Fri, 15 Sep 2017 15:18:21 +0000 (18:18 +0300)]
Display locations, which can't be tracked by profiler, as "untracked ()"
Ruben Ayrapetyan [Fri, 15 Sep 2017 15:18:16 +0000 (18:18 +0300)]
Record and display offset of unmanaged function in corresponding module.
Ruben Ayrapetyan [Fri, 15 Sep 2017 15:18:11 +0000 (18:18 +0300)]
Skip zero-sized allocation entries in GUI.
Ruben Ayrapetyan [Fri, 15 Sep 2017 15:18:06 +0000 (18:18 +0300)]
Output module name on charts, if known.
Ruben Ayrapetyan [Fri, 15 Sep 2017 15:18:01 +0000 (18:18 +0300)]
Add malloc/realloc/calloc/posix_memalign/mmap/dlopen function to raw call stack (show them in call trees and flame graphs in GUI).
Ruben Ayrapetyan/SRR-Compiler Lab/./삼성전자 [Thu, 14 Sep 2017 14:42:27 +0000 (17:42 +0300)]
Merge pull request #10 from dotnet/track-dlopen-and-sbrk
Approximately track and visualize memory allocated from dlopen and sbrk
Ruben Ayrapetyan [Thu, 14 Sep 2017 14:35:34 +0000 (17:35 +0300)]
Add approximate tracking of [heap].
Ruben Ayrapetyan [Thu, 14 Sep 2017 14:35:29 +0000 (17:35 +0300)]
Add approximate trace of mmaps/munmaps from dlopen/dlclose.
Ruben Ayrapetyan/SRR-Compiler Lab/./삼성전자 [Thu, 14 Sep 2017 14:28:34 +0000 (17:28 +0300)]
Merge pull request #9 from dotnet/fix-several-issues-in-debug-information-tracing
Fix several issues in parsing and tracing debug information
Gleb Balykov [Thu, 14 Sep 2017 14:25:54 +0000 (17:25 +0300)]
Fix bug with non-copied string in libbacktrace
Ruben Ayrapetyan [Thu, 14 Sep 2017 14:25:18 +0000 (17:25 +0300)]
Fix parsing ELF.
Ruben Ayrapetyan [Thu, 14 Sep 2017 14:25:13 +0000 (17:25 +0300)]
Fix handling of missing build-id.
Ruben Ayrapetyan/SRR-Compiler Lab/./삼성전자 [Thu, 14 Sep 2017 14:22:45 +0000 (17:22 +0300)]
Merge pull request #8 from dotnet/fix-posix-memalign
Fix accounting for posix_memalign-allocated memory
Ruben Ayrapetyan [Thu, 14 Sep 2017 14:19:26 +0000 (17:19 +0300)]
Fix accounting posix_memalign.
Ruben Ayrapetyan/SRR-Compiler Lab/./삼성전자 [Thu, 14 Sep 2017 13:44:56 +0000 (16:44 +0300)]
Merge pull request #7 from dotnet/track-mmap-munmap
Track and visualize physical memory consumption for mmap-allocated regions
Ruben Ayrapetyan [Thu, 14 Sep 2017 13:29:59 +0000 (16:29 +0300)]
Hide unnecessary parts of GUI in each display mode.
Ruben Ayrapetyan [Thu, 14 Sep 2017 13:29:53 +0000 (16:29 +0300)]
Add command line options for setting part of memory consumption to display.
Ruben Ayrapetyan [Thu, 14 Sep 2017 13:29:48 +0000 (16:29 +0300)]
Fix calculating peak RSS.
Ruben Ayrapetyan [Thu, 14 Sep 2017 13:29:43 +0000 (16:29 +0300)]
Handle total cost updates upon mmap/munmap and physical memory consumption update in analyzer.
Ruben Ayrapetyan [Thu, 14 Sep 2017 13:29:38 +0000 (16:29 +0300)]
Calculate mmap/munmap memory consumption per call stack.
Ruben Ayrapetyan [Thu, 14 Sep 2017 13:29:33 +0000 (16:29 +0300)]
Process mmap/munmap and smaps trace items in analyzer.
Maintain address ranges information in analyzer.
Ruben Ayrapetyan [Thu, 14 Sep 2017 13:29:28 +0000 (16:29 +0300)]
Trace /proc/self/smaps by timer.
Ruben Ayrapetyan [Thu, 14 Sep 2017 13:29:23 +0000 (16:29 +0300)]
Add mmap/munmap to interpret's output.
Ruben Ayrapetyan [Thu, 14 Sep 2017 13:29:18 +0000 (16:29 +0300)]
Add empty trackers of mmap/munmap.
Ruben Ayrapetyan [Thu, 14 Sep 2017 13:29:13 +0000 (16:29 +0300)]
Introduce display modes (malloc, Private_Dirty, Private_Clean, Shared = Shared_Clean + Shared_Dirty).
Ruben Ayrapetyan/SRR-Compiler Lab/./삼성전자 [Thu, 14 Sep 2017 08:43:39 +0000 (11:43 +0300)]
Merge pull request #6 from dotnet/fix-backtraces-on-armel
Fix calculating unmanaged code backtraces on armel
Ruben Ayrapetyan [Tue, 8 Aug 2017 16:17:00 +0000 (19:17 +0300)]
Apply patch https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01209.html to libbacktrace.
Author of the applied patch is Denis Khalikov <d.khalikov@partner.samsung.com>
Ruben Ayrapetyan [Tue, 8 Aug 2017 16:16:40 +0000 (19:16 +0300)]
Support .rel.plt in try_overwrite_symbols.
Ruben Ayrapetyan [Tue, 8 Aug 2017 16:16:11 +0000 (19:16 +0300)]
Use backtrace instead of unw_backtrace in Trace::fill.
Milian Wolff [Tue, 4 Apr 2017 17:41:23 +0000 (19:41 +0200)]
WIP: Include the build-id in the heaptrack output and use it to find libs
l10n daemon script [Fri, 4 Aug 2017 01:14:31 +0000 (03:14 +0200)]
GIT_SILENT made messages (after extraction)
l10n daemon script [Tue, 25 Jul 2017 01:12:49 +0000 (03:12 +0200)]
GIT_SILENT made messages (after extraction)
Milian Wolff [Thu, 29 Jun 2017 11:36:06 +0000 (13:36 +0200)]
Use i18n instead of tr
Milian Wolff [Thu, 29 Jun 2017 11:35:26 +0000 (13:35 +0200)]
Add reset view action to flame graph
Milian Wolff [Sat, 24 Jun 2017 11:58:34 +0000 (13:58 +0200)]
Find peak memory consumption in first-pass over input data
This allows us to compute the per-allocation peak data only once,
which dramatically improves the runtime of heaptrack's analysis on
large data files that hit many individual peaks until the largest
one is finally reached.
I.e. before this patch, the first pass through the data (without
waiting for the graphs to be generated) on one medium-sized heaptrack
file takes about ~2.4s. With this patch applied, this time goes down
to about ~0.9s. This is despite having to walk through the whole file
twice!
l10n daemon script [Wed, 21 Jun 2017 04:50:05 +0000 (06:50 +0200)]
GIT_SILENT made messages (after extraction)
l10n daemon script [Sun, 11 Jun 2017 02:31:19 +0000 (04:31 +0200)]
SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
l10n daemon script [Thu, 8 Jun 2017 02:52:53 +0000 (04:52 +0200)]
SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
Milian Wolff [Tue, 23 May 2017 15:29:11 +0000 (17:29 +0200)]
Format time values larger than 1min in terms of minutes
Milian Wolff [Tue, 23 May 2017 15:26:23 +0000 (17:26 +0200)]
Restore the caching functionality in StringCache::location
The patch
1b9a59dc broke this by refactoring the code. It forgot
to store the non-cached value back in the faster lookup table.
See the original patch
c370b7be for the advantage this fast-path
can bring.
Milian Wolff [Tue, 23 May 2017 15:17:42 +0000 (17:17 +0200)]
Move time-formatting code into a Util header
Milian Wolff [Tue, 23 May 2017 14:59:42 +0000 (16:59 +0200)]
Further optimize handling of peak data cost
We now only update the peak costs once we leave the peak. This
allows us to merge multiple consecutive allocations, which each
lead to an increment in the peak memory consumption. Instead of
updating the peak costs every time, we now only update the peaks
once at the end of the peak patter, just before memory is freed
or the record process has finished.
This brings the processing time back to the original ~1.2s I have
seen initially for my real-world data file.
Milian Wolff [Tue, 23 May 2017 14:50:03 +0000 (16:50 +0200)]
Only update peak costs on the first parse pass
On the second parse pass we can reuse the initial data. This
saves ~200ms of parse time in my test case, and brings the time
down to ~1.6s from 1.8s.
Milian Wolff [Tue, 23 May 2017 14:34:51 +0000 (16:34 +0200)]
Add missing license headers
Milian Wolff [Tue, 23 May 2017 14:08:19 +0000 (16:08 +0200)]
Optimize tracking of peak costs
Use a separate container for the potentially frequent write
operations when updating the peak memory consumption of all
allocation locations. This allows us to only update what is
actually required and thus makes better use of our CPU caches.
In one of my example files, this decreases the processing time
from about 2.2s down to 1.8s, i.e. it's about 22% faster. But,
compared to the original approach with the different "peak"
heuristic, which took ~1.2s, we are still about 33% slower.
Milian Wolff [Tue, 23 May 2017 13:43:17 +0000 (15:43 +0200)]
Make peak memory consumption easier to understand
This changes the meaning of the peak metric, but frequent feedback
was that the value we used to show was confusing.
Previously, we tracked the peak memory consumption individually by
backtrace. Only at the end did we then aggregate the total, at
which point we lose the temporal resolution. The new peak example
shows how this goes wrong: it used to show a "peak" of 275B in
`allocate_something`, while the expected "peak" is actually only
125B.
The new code repurposes the peak metric to mean "contribution to
peak memory consumption". This requires us to update the peak value
for all allocations whenever we hit a new peak, which is a quite
costly procedure and greatly slows down the overall processing time.
One of my test files took ~1.2s in total to be processed before
this patch. Now, it takes ~2.2s in total - so processing is about
45% slower with this patch.
Nevertheless, I think it's worth it as it makes the cost metric
easier to understand and thus hopefully more useful for users of
heaptrack.
Milian Wolff [Tue, 23 May 2017 12:48:25 +0000 (14:48 +0200)]
Always use KFormat::MetricBinaryDialect
This dialect is much simpler to grasp and usually what
people expect when talking about megabytes and kilobytes.
Milian Wolff [Wed, 17 May 2017 13:13:59 +0000 (15:13 +0200)]
Hide rows with less than 1% of the cost from the top proxy
This drastically reduces the clutter on the summary page and we
can concentrate on the actual pain-points.
Milian Wolff [Wed, 17 May 2017 10:00:41 +0000 (12:00 +0200)]
Use fixed formatting for percentages in heaptrack_print
Otherwise we could end up printing 100% as "1.00E2%". Now, we will
print it as "100.00%".
Milian Wolff [Wed, 3 May 2017 15:48:35 +0000 (17:48 +0200)]
Update comment, this list is sorted by now
Milian Wolff [Wed, 3 May 2017 15:43:19 +0000 (17:43 +0200)]
Handle fscanf failure when reading RSS from /proc/self/statm
In such situations, disable further read attempts of the RSS value.
Fixes compiler warnings like this one:
src/track/libheaptrack.cpp:339:51: warning:
ignoring return value of ‘int fscanf(FILE*, const char*, ...)’,
declared with attribute warn_unused_result [-Wunused-result]
Kevin Funk [Tue, 9 May 2017 16:13:25 +0000 (18:13 +0200)]
Make sure KF5_FOUND is FALSE when not all components are available
heaptrack_gui needs all components
Milian Wolff [Tue, 9 May 2017 11:01:37 +0000 (13:01 +0200)]
Do not print zero-cost sub-branches in diff mode
Friedrich W. H. Kossebau [Mon, 8 May 2017 14:54:18 +0000 (16:54 +0200)]
Don't repeat work of KAboutData::setApplicationData()
Milian Wolff [Mon, 8 May 2017 12:52:26 +0000 (14:52 +0200)]
Show inlined frames
This is a major usability improvement for C++ code. Previously,
when we profiled code with heaptrack that was built with compiler
optimizations enabled, most allocations within container classes
where missing some parent frames. Even more confusing, sometimes
we missed the interesting user frames completely, when they
got inlined.
Now, we add all inlined frames to the heaptrack_print output and
also include them in the heaptrack_gui models. The simple
inlining example added by this pach clearly shows the advantage:
Before all we got is this:
1 calls to allocation functions with 1.23KB peak consumption from
main
at /home/milian/projects/src/heaptrack/tests/manual/inlining.cpp:18
in /home/milian/projects/build/heaptrack/tests/manual/inlining
Afterwards, we get all frames:
1 calls to allocation functions with 1.23KB peak consumption from
asdf()
at /home/milian/projects/src/heaptrack/tests/manual/inlining.cpp:3
in /home/milian/projects/build/heaptrack/tests/manual/inlining
bar()
at /home/milian/projects/src/heaptrack/tests/manual/inlining.cpp:8
foo()
at /home/milian/projects/src/heaptrack/tests/manual/inlining.cpp:13
main
at /home/milian/projects/src/heaptrack/tests/manual/inlining.cpp:18
Milian Wolff [Wed, 3 May 2017 22:07:26 +0000 (00:07 +0200)]
Do not clear flamegraph on hide
This way we keep the history / zoom state when navigating away from
the flamegraph, e.g. to quickly check something in the caller/callee
view.
Milian Wolff [Wed, 3 May 2017 15:36:35 +0000 (17:36 +0200)]
Force the fill method to never get inlined
Milian Wolff [Wed, 3 May 2017 15:35:18 +0000 (17:35 +0200)]
Filter zero frames from the end of the stack returned by libunwind
Some (older) versions of libunwind eratically return zero frames
at the end of the stack. This happened on Debian and Ubuntu with the
distro provided libunwind. In such situations, we now skip these
uninteresting frames.
BUG: 379082
Milian Wolff [Tue, 2 May 2017 21:19:13 +0000 (23:19 +0200)]
Disable flamegraph navigation actions when they are not applicable
Milian Wolff [Tue, 2 May 2017 20:57:24 +0000 (22:57 +0200)]
Also show tooltips with function identifiers
Do not try to use fancy HTML formatting here though, as its making
text elision harder than necessary. It would also break tooltips
for very long function names which often happens in STL-using code.
BUG: 379360
Milian Wolff [Tue, 2 May 2017 20:54:14 +0000 (22:54 +0200)]
Add search feature to flamegraph
This is similar to the search feature available in the interactive
SVGs generated by flamegraph.pl. It allows you to search for strings
contained within the function names and will calculate the total
contribution in the flamegraph.
Milian Wolff [Tue, 2 May 2017 19:47:26 +0000 (21:47 +0200)]
Add CMake's Copyright.txt which is referenced by FindLibunwind.cmake
Milian Wolff [Tue, 2 May 2017 19:33:03 +0000 (21:33 +0200)]
Clarify licenses
This code uses the LGPL, so use the correct LGPL header, not a mixture
of GPL and LGPL.
Milian Wolff [Tue, 2 May 2017 18:57:43 +0000 (20:57 +0200)]
Remove unused ModelTest
It is GPL licensed while the rest is LGPL licensed.
Milian Wolff [Fri, 28 Apr 2017 11:34:42 +0000 (13:34 +0200)]
Include raw byte size in tooltips
When the size is larger than 1KB we lose some precision. In such
cases also show the raw byte size in parenthesis after the shortened
value to allow accurate manual comparisons.
BUG: 379222
Milian Wolff [Fri, 28 Apr 2017 11:28:04 +0000 (13:28 +0200)]
Use byte size in allocated tooltip
It was wrongly using the time twice.
BUG: 379221
Milian Wolff [Fri, 28 Apr 2017 11:24:37 +0000 (13:24 +0200)]
Properly remap string indices before asserting equality
The string indices in the IP belong to the other file and thus
will mismatch. We need to remap them before we can commpare the
data in the assertion correctly.
BUG: 379220
Bruno P. Kinoshita [Mon, 24 Apr 2017 23:25:38 +0000 (11:25 +1200)]
s/calcuation/calculation
l10n daemon script [Tue, 18 Apr 2017 07:50:03 +0000 (09:50 +0200)]
SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
Milian Wolff [Mon, 17 Apr 2017 19:14:15 +0000 (21:14 +0200)]
Call libc and libstdc++ freeres functions in heaptrack_preload on exit
These functions are used by Valgrind already and can be used to force
a clean shutdown of libc and libstdc++. Both usually don't bother
freeing their global resources, which used to be reported as memory
leaks by heaptrack. By calling the freeres functions we now get a
clean shutdown of the libc_leaks.c example without any memory leaks
reported.
Thanks to Maxim Golov for pointing out this hidden functionality and
providing a test case.
BUG: 378765