]>
git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gprofng/src/Ovw_data.h
1 /* Copyright (C) 2021-2024 Free Software Foundation, Inc.
4 This file is part of GNU Binutils.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
24 // An Ovw_data object is used to supply data for constructing an overview
27 #include "dbe_structs.h"
37 {// in display order, not LMS_* order
38 // Note: use same display order of LMS_* in: er.rc, TimelineVariable.java,
39 // Ovw_data.h, BaseMetricTreeNode.cc and Experiment.cc metric registration
50 OVW_NUMVALS
// must be last
53 // Ovw_item contains one slice of data
56 Value values
[OVW_NUMVALS
+ 1]; // Value list (value[0] is left over)
57 int states
; // Number of non-zero states
58 Value total
; // Total of all values
59 int size
; // Number of values
60 timestruc_t start
; // Start time of sample
61 timestruc_t duration
; // Duration of sample
62 timestruc_t end
; // End time of sample
63 timestruc_t tlwp
; // Total LWP time
64 double nlwp
; // Average number of LWPs
65 ValueTag type
; // Type of value
66 int number
; // Sample number
67 char *start_label
; // Sample start label
68 char *end_label
; // Sample end label
71 Ovw_data (DataView
*, hrtime_t exp_start
);
74 void sum (Ovw_data
*data
);
75 Ovw_item
get_totals ();
76 Ovw_item
get_labels ();
78 // zero out contents of Ovw_item
79 static Ovw_item
*reset_item (Ovw_item
*item
);
84 return ovw_items
->size ();
90 return *ovw_items
->fetch (index
);
94 // Compute the values for "ovw_item" from "sample".
95 void extract_data (Ovw_item
*ovw_item
, Sample
*sample
);
97 Vector
<Ovw_item
*> *ovw_items
;
98 Ovw_item
*totals
; // Item to cache totals
102 #endif /* _OVW_DATA_H */