mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-04 02:18:37 +00:00
This commit thoroughly overhauls DHAT, moving it out of the
"experimental" ghetto. It makes moderate changes to DHAT itself,
including dumping profiling data to a JSON format output file. It also
implements a new data viewer (as a web app, in dhat/dh_view.html).
The main benefits over the old DHAT are as follows.
- The separation of data collection and presentation means you can run a
program once under DHAT and then sort the data in various ways. Also,
full data is in the output file, and the viewer chooses what to omit.
- The data can be sorted in more ways than previously. Some of these
sorts involve useful filters such as "short-lived" and "zero reads or
zero writes".
- The tree structure view avoids the need to choose stack trace depth.
This avoids both the problem of not enough depth (when records that
should be distinct are combined, and may not contain enough
information to be actionable) and the problem of too much depth (when
records that should be combined are separated, making them seem less
important than they really are).
- Byte and block measures are shown with a percentage relative to the
global count, which helps gauge relative significance of different
parts of the profile.
- Byte and blocks measures are also shown with an allocation rate
(bytes and blocks per million instructions), which enables comparisons
across multiple profiles, even if those profiles represent different
workloads.
- Both global and per-node measurements are taken at the global heap
peak ("At t-gmax"), which gives Massif-like insight into the point of
peak memory use.
- The final/liftimes stats are a bit more useful than the old deaths
stats. (E.g. the old deaths stats didn't take into account lifetimes
of unfreed blocks.)
- The handling of realloc() has changed. The sequence `p = malloc(100);
realloc(p, 200);` now increases the total block count by 2 and the
total byte count by 300. Previously it increased them by 1 and 200.
The new handling is a more operational view that better reflects the
effect of allocations on performance. It makes a significant
difference in the results, giving paths involving reallocation (e.g.
repeated pushing to a growing vector) more prominence.
Other things of note:
- There is now testing, both regression tests that run within the
standard test suite, and viewer-specific tests that cannot run within
the standard test suite. The latter are run by loading
dh_view.html?test=1 in a web browser.
- The commit puts all tool lists in Makefiles (and similar files) in the
following consistent order: memcheck, cachegrind, callgrind, helgrind,
drd, massif, dhat, lackey, none; exp-sgcheck, exp-bbv.
- A lot of fields in dh_main.c have been given more descriptive names.
Those names now match those used in dh_view.js.
131 lines
3.3 KiB
CSS
131 lines
3.3 KiB
CSS
|
|
/*--------------------------------------------------------------------*/
|
|
/*--- DHAT: a Dynamic Heap Analysis Tool dh_view.css ---*/
|
|
/*--------------------------------------------------------------------*/
|
|
|
|
/*
|
|
This file is part of DHAT, a Valgrind tool for profiling the
|
|
heap usage of programs.
|
|
|
|
Copyright (C) 2018 Mozilla Foundation
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License as
|
|
published by the Free Software Foundation; either version 2 of the
|
|
License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful, but
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
02111-1307, USA.
|
|
|
|
The GNU General Public License is contained in the file COPYING.
|
|
*/
|
|
|
|
html {
|
|
background: #cfcfcf; /* pale grey */
|
|
}
|
|
|
|
.section {
|
|
border-radius: 10px;
|
|
background-color: white;
|
|
padding: 1em;
|
|
margin: 0.5em 0;
|
|
}
|
|
|
|
div.header {
|
|
font-weight: bold;
|
|
display: inline-block;
|
|
margin: 0 1.5em 0 0;
|
|
border-radius: 10px;
|
|
padding: 0.5em;
|
|
background-color: #cfcfcf; /* pale grey */
|
|
-moz-user-select: none;
|
|
-webkit-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.error {
|
|
color: red;
|
|
}
|
|
|
|
.invocation {
|
|
background-color: #bfd7d7; /* pale blue-grey */
|
|
}
|
|
|
|
.times {
|
|
background-color: #efdfbf; /* pale brown */
|
|
}
|
|
|
|
.arrow, .treeline {
|
|
background-color: white;
|
|
}
|
|
|
|
.internal {
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* increasingly pale shades of green */
|
|
.leaf.lt100 { background-color: #7fff7f; }
|
|
.leaf.lt32 { background-color: #8fff8f; }
|
|
.leaf.lt16 { background-color: #9fff9f; }
|
|
.leaf.lt8 { background-color: #afffaf; }
|
|
.leaf.lt4 { background-color: #bfffbf; }
|
|
.leaf.lt2 { background-color: #cfffcf; }
|
|
.leaf.lt1 { background-color: #dfffdf; }
|
|
.leaf.insig { background-color: #efffef; }
|
|
|
|
/* increasingly pale shades of yellow */
|
|
.collapsed.lt100 { background-color: #ffff7f; }
|
|
.collapsed.lt32 { background-color: #ffff8f; }
|
|
.collapsed.lt16 { background-color: #ffff9f; }
|
|
.collapsed.lt8 { background-color: #ffffaf; }
|
|
.collapsed.lt4 { background-color: #ffffbf; }
|
|
.collapsed.lt2 { background-color: #ffffcf; }
|
|
.collapsed.lt1 { background-color: #ffffdf; }
|
|
.collapsed.insig { background-color: #ffffef; }
|
|
|
|
/* increasingly pale shades of blue */
|
|
.expanded.lt100 { background-color: #7f7fff; }
|
|
.expanded.lt32 { background-color: #8f8fff; }
|
|
.expanded.lt16 { background-color: #9f9fff; }
|
|
.expanded.lt8 { background-color: #afafff; }
|
|
.expanded.lt4 { background-color: #bfbfff; }
|
|
.expanded.lt2 { background-color: #cfcfff; }
|
|
.expanded.lt1 { background-color: #dfdfff; }
|
|
.expanded.insig { background-color: #efefff; }
|
|
|
|
.bold {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.threshold {
|
|
background-color: #dfdfdf; /* pale grey */
|
|
}
|
|
|
|
.noselect {
|
|
-moz-user-select: none;
|
|
-webkit-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.legend, .timings {
|
|
font-size: 80%;
|
|
padding: 0 1em;
|
|
}
|
|
|
|
.debug {
|
|
font-size: 80%;
|
|
}
|