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. */
21 #ifndef _MEMORYSPACE_H
22 #define _MEMORYSPACE_H
26 #include "dbe_structs.h"
28 #include "Exp_Layout.h"
30 #include "Hist_data.h"
50 char *short_description
;
51 char *long_description
;
58 MemorySpace (DbeView
*_dbev
, int subtype
);
70 getMemObjTypeName (void)
81 // static members, used to define or fetch the various MemorySpaces
82 static void get_filter_keywords (Vector
<void*> *res
);
83 static Vector
<void*> *getMemObjects (void);
84 static void set_MemTabOrder (Vector
<int> *);
85 static char *mobj_define (char *, char *, char *, char *, char *);
86 static char *mobj_delete (char *);
87 static MemObjType_t
*findMemSpaceByName (const char *mname
);
88 static MemObjType_t
*findMemSpaceByIndex (int index
);
89 static char pickMnemonic (char *name
);
90 static Vector
<char *> *getMachineModelMemObjs (char *);
93 HashMap
<uint64_t, MemObj
*> *objs
;
94 int findMemObject (uint64_t indx
);
95 MemObj
*lookupMemObject (Experiment
*exp
, DataView
*, long);
96 MemObj
*createMemObject (uint64_t, char *moname
);
98 int mstype
; // type of this memory space
99 char *msname
; // name of this memory space
100 Expression
*msindex_exp
; // index-expression for this memory space
101 char *msindex_exp_str
; // string for index-expression
102 Hist_data
*hist_data_all
; // the cached data for mode=Hist_Data::ALL
103 uint64_t selected_mo_index
; // which page, cacheline, etc.
104 int sel_ind
; // index of selected object in list
110 MemObj
*total_memobj
;
113 #endif /* _MEMORYSPACE_H */