HPCToolkit
loadmap.c
Go to the documentation of this file.
1 // -*-Mode: C++;-*- // technically C99
2 
3 // * BeginRiceCopyright *****************************************************
4 //
5 // $HeadURL$
6 // $Id$
7 //
8 // --------------------------------------------------------------------------
9 // Part of HPCToolkit (hpctoolkit.org)
10 //
11 // Information about sources of support for research and development of
12 // HPCToolkit is at 'hpctoolkit.org' and in 'README.Acknowledgments'.
13 // --------------------------------------------------------------------------
14 //
15 // Copyright ((c)) 2002-2019, Rice University
16 // All rights reserved.
17 //
18 // Redistribution and use in source and binary forms, with or without
19 // modification, are permitted provided that the following conditions are
20 // met:
21 //
22 // * Redistributions of source code must retain the above copyright
23 // notice, this list of conditions and the following disclaimer.
24 //
25 // * Redistributions in binary form must reproduce the above copyright
26 // notice, this list of conditions and the following disclaimer in the
27 // documentation and/or other materials provided with the distribution.
28 //
29 // * Neither the name of Rice University (RICE) nor the names of its
30 // contributors may be used to endorse or promote products derived from
31 // this software without specific prior written permission.
32 //
33 // This software is provided by RICE and contributors "as is" and any
34 // express or implied warranties, including, but not limited to, the
35 // implied warranties of merchantability and fitness for a particular
36 // purpose are disclaimed. In no event shall RICE or contributors be
37 // liable for any direct, indirect, incidental, special, exemplary, or
38 // consequential damages (including, but not limited to, procurement of
39 // substitute goods or services; loss of use, data, or profits; or
40 // business interruption) however caused and on any theory of liability,
41 // whether in contract, strict liability, or tort (including negligence
42 // or otherwise) arising in any way out of the use of this software, even
43 // if advised of the possibility of such damage.
44 //
45 // ******************************************************* EndRiceCopyright *
46 
47 #include <sys/time.h>
48 #include "cct.h"
49 #include "loadmap.h"
50 #include "fnbounds_interface.h"
51 #include "fnbounds_file_header.h"
52 #include "hpcrun_stats.h"
53 #include "sample_event.h"
54 #include "epoch.h"
55 
56 #include <messages/messages.h>
57 
58 #include <lib/prof-lean/hpcfmt.h>
59 #include <lib/prof-lean/spinlock.h>
60 
61 #define LOADMAP_DEBUG 0
62 
63 #define UW_RECIPE_MAP_DEBUG 0
64 
67 
69 
70 
72 
73 void
75 {
77  notification_recipients = n;
78 }
79 
80 
81 static void
82 hpcrun_loadmap_notify_map(void *start, void *end)
83 {
85  while (n) {
86  n->map(start, end);
87  n = n->next;
88  }
89 }
90 
91 
92 static void
93 hpcrun_loadmap_notify_unmap(void *start, void *end)
94 {
96  while (n) {
97  n->unmap(start, end);
98  n = n->next;
99  }
100 }
101 
102 
103 //***************************************************************************
104 //
105 //***************************************************************************
106 
107 dso_info_t*
109 {
110  dso_info_t* x = NULL;
111 
112  if (s_dso_free_list) {
113  x = s_dso_free_list;
114  s_dso_free_list = s_dso_free_list->next;
115  if (s_dso_free_list) {
116  s_dso_free_list->prev = NULL;
117  }
118  x->next = NULL; // prev should already be NULL
119  }
120  else {
121  TMSG(DSO, " hpcrun_dso_new");
122  x = (dso_info_t*) hpcrun_malloc(sizeof(dso_info_t));
123  }
124 
125  return x;
126 }
127 
128 
129 dso_info_t*
130 hpcrun_dso_make(const char* name, void** table,
131  struct fnbounds_file_header* fh,
132  void* startaddr, void* endaddr, unsigned long map_size)
133 {
134  dso_info_t* x = hpcrun_dso_new();
135 
136  TMSG(DSO," hpcrun_dso_make for module %s", name);
137 
138  int namelen = strlen(name) + 1;
139  x->name = (char*) hpcrun_malloc(namelen);
140  strcpy(x->name, name);
141 
142  x->table = table;
143  x->map_size = map_size;
144  x->nsymbols = 0;
145  x->start_to_ref_dist = 0;
146  x->start_addr = startaddr;
147  x->end_addr = endaddr;
148 
149  if (fh) {
150  x->nsymbols = (unsigned long)fh->num_entries;
152 
153  // Cf. hpcrun_normalize_ip(): Given ip, compute lm_ip:
154  // lm_ip = (ip - lm_mapped_start) + lm_ip_ref
155  // = ip - (lm_mapped_start - lm_ip_ref)
156  // = ip - start_to_ref_dist
157  if (fh->is_relocatable) {
158  x->start_to_ref_dist = (uintptr_t)startaddr - fh->reference_offset;
159  }
160  }
161  x->next = NULL;
162  x->prev = NULL;
163 
164  TMSG(DSO, "new dso: start = %p, end = %p, name = %s",
165  startaddr, endaddr, name);
166 
167  return x;
168 }
169 
170 
171 //***************************************************************************
172 
173 void
175 {
176  for (dso_info_t* x = dl_list; (x); x = x->next) {
177  hpcrun_dso_dump(x);
178  }
179 }
180 
181 
182 void
184 {
185  printf("%p-%p %s [dso_info_t *%p, table=%p, nsymbols=%ld, relocatable=%d]\n",
186  x->start_addr, x->end_addr, x->name,
187  x, x->table, x->nsymbols, x->is_relocatable);
188 }
189 
190 
191 //***************************************************************************
192 //
193 //***************************************************************************
194 
196 hpcrun_loadModule_new(const char* name)
197 {
199 
200  //memset(x, 0, sizeof(*x));
201 
202  x->id = ++(s_loadmap_ptr->size); // largest id = size
203 
204  int namelen = strlen(name) + 1;
205  x->name = (char*) hpcrun_malloc(namelen);
206  strcpy(x->name, name);
207 
208  x->dso_info = NULL;
209  x->next = NULL;
210  x->prev = NULL;
211 
212  return x;
213 }
214 
215 
216 
217 
218 //***************************************************************************
219 
222 {
223  TMSG(LOADMAP, " --NEW");
225  if (x == NULL) {
226  EMSG("New loadmap requested, but allocation failed!!");
227  return NULL;
228  }
229 
231 
232  return x;
233 }
234 
235 
236 void
238 {
239  TMSG(LOADMAP, "init");
240  memset(x, 0, sizeof(*x));
241 
242  x->lm_head = NULL;
243  x->lm_end = NULL;
244  x->size = 0;
245 }
246 
247 //
248 // debugging operation, print loadmap in reverse order
249 //
250 void
252 {
253  for (load_module_t* lm = loadmap->lm_end; lm; lm = lm->prev) {
254  printf("%u %s\n", lm->id, lm->name);
255  }
256 }
257 
258 //***************************************************************************
259 
261 hpcrun_loadmap_findByAddr(void* begin, void* end)
262 {
263  TMSG(LOADMAP, "find by address %p -- %p", begin, end);
264  for (load_module_t* x = s_loadmap_ptr->lm_head; (x); x = x->next) {
265  TMSG(LOADMAP, "\tload module %s", x->name);
266  if (x->dso_info) {
267  TMSG(LOADMAP, "\t\t [%lx, %lx) table [%lx, %lx)",
268  (uintptr_t) x->dso_info->start_addr,
269  (uintptr_t) x->dso_info->end_addr,
270  ((uintptr_t) x->dso_info->table ? ((uintptr_t) x->dso_info->table[0] +
271  x->dso_info->start_to_ref_dist) : -1),
272  ((uintptr_t) x->dso_info->table ? ((uintptr_t) x->dso_info->table[x->dso_info->nsymbols -1] +
273  x->dso_info->start_to_ref_dist) : -1)
274  );
275  if (x->dso_info->start_addr <= begin && end <= x->dso_info->end_addr) {
276  TMSG(LOADMAP, " --->%s", x->name);
277  return x;
278  }
279  }
280  }
281  TMSG(LOADMAP, " --->(NOT FOUND)");
282  return NULL;
283 }
284 
285 
287 hpcrun_loadmap_findByName(const char* name)
288 {
289  TMSG(LOADMAP, "find by name: %s", name);
290  for (load_module_t* x = s_loadmap_ptr->lm_head; (x); x = x->next) {
291  if (strcmp(x->name, name) == 0) {
292  TMSG(LOADMAP, " --->FOUND", x->name);
293  return x;
294  }
295  }
296  TMSG(LOADMAP, " --->(NOT FOUND)");
297  return NULL;
298 }
299 
302 {
303  TMSG(LOADMAP, "find by id %d", id);
304  for (load_module_t* x = s_loadmap_ptr->lm_head; (x); x = x->next) {
305  if (x->id == id) {
306  TMSG(LOADMAP, " --->%s", x->name);
307  return x;
308  }
309  }
310  TMSG(LOADMAP, " --->(NOT FOUND)");
311  return NULL;
312 }
313 
314 const char*
316 {
317  TMSG(LOADMAP, "find load name: %s", name);
318  for (load_module_t* x = s_loadmap_ptr->lm_head; (x); x = x->next) {
319  if (strstr(x->name, name)) {
320  TMSG(LOADMAP, " --->%s", x->name);
321  return x->name;
322  }
323  }
324  TMSG(LOADMAP, " --->(NOT FOUND)");
325  return NULL;
326 }
327 
328 
329 //***************************************************************************
330 
331 static void
333 {
334  TMSG(LOADMAP, "push front: %s", lm->name);
335  // link 'm' at the head of the list of loaded modules
336  if (s_loadmap_ptr->lm_head) {
337  TMSG(LOADMAP, "previous front = %s", s_loadmap_ptr->lm_head->name);
338  s_loadmap_ptr->lm_head->prev = lm;
339  lm->next = s_loadmap_ptr->lm_head;
340  lm->prev = NULL;
341  s_loadmap_ptr->lm_head = lm;
342  }
343  else {
344  TMSG(LOADMAP, " ->First entry");
345  s_loadmap_ptr->lm_head = lm;
346  s_loadmap_ptr->lm_end = lm;
347  lm->next = NULL;
348  lm->prev = NULL;
349  }
350 }
351 
352 
353 #if 0
354 // Pushes 'lm' to the end of the current loadmap. Should only occur
355 // when lm's dso_info field has become invalidated, thus creating a
356 // sub-list of invalid load modules at the end of the loadmap.
357 static void
358 hpcrun_loadmap_moveToBack(load_module_t* lm)
359 {
360  // short-circuit if lm is already at end of list
361  if (lm == s_loadmap_ptr->lm_end) {
362  return;
363  }
364 
365  // -------------------------------------------------------
366  // INVARIANT: lm is not at the end of the list
367  // -------------------------------------------------------
368 
369  if (lm->prev) {
370  lm->prev->next = lm->next;
371  }
372  else { // if lm->prev == NULL => lm == s_loadmap_ptr->lm_head
373  s_loadmap_ptr->lm_head = lm->next;
374  }
375 
376  if (lm->next) {
377  lm->next->prev = lm->prev;
378  }
379 
380  lm->prev = s_loadmap_ptr->lm_end;
381  lm->prev->next = lm;
382  lm->next = NULL;
383  s_loadmap_ptr->lm_end = lm;
384 }
385 #endif
386 
387 
390 {
391  const char* msg = "";
392 
393  TMSG(LOADMAP, "map in dso %s", dso->name);
394  // -------------------------------------------------------
395  // Find or create a load_module_t: if a load module exists
396  // with same name, reuse it; otherwise create a new entry
397  // -------------------------------------------------------
399  if (lm) {
400  // sanity check to ensure internal consistency
401  if (lm->dso_info != dso) {
402  TMSG(LOADMAP, " !! Internal consistency check fires !!");
404  lm->dso_info = dso;
405  }
406  else {
407  EMSG("hpcrun_loadmap_map(): attempt to both map dso '%s' and place it on the free list!", dso->name);
408  }
409  msg = "(reuse)";
410  }
411  else {
412  lm = hpcrun_loadModule_new(dso->name);
413  lm->dso_info = dso;
415 
416 #if UW_RECIPE_MAP_DEBUG
417  fprintf(stderr, "hpcrun_loadmap_map: '%s' start=%p end=%p\n",
418  dso->name, lm->dso_info->start_addr, lm->dso_info->end_addr);
419 #endif
420 
422  lm->dso_info->end_addr);
423  }
424 
425  TMSG(LOADMAP, "hpcrun_loadmap_map: '%s' size=%d %s",
426  dso->name, s_loadmap_ptr->size, msg);
427 
428  return lm;
429 }
430 
431 
432 void
434 {
435  TMSG(LOADMAP,"hpcrun_loadmap_unmap: '%s'", lm->name);
436 
437  dso_info_t* old_dso = lm->dso_info;
438 
439  if (old_dso == NULL) return; // nothing to do!
440 
441  void *start_addr = old_dso->start_addr;
442  void *end_addr = old_dso->end_addr;
443 
444  lm->dso_info = NULL;
445 
446  // tallent: For now, do not move the loadmap to the back of the
447  // list. If we want to enable, this, we could have
448  // hpcrun_loadmap_findByName() begin its search from the end
449  // of the list.
450  //hpcrun_loadmap_moveToBack(lm);
451 
452  // add old_dso to the head of the s_dso_free_list
453  old_dso->next = s_dso_free_list;
454  old_dso->prev = NULL;
455  if (s_dso_free_list) {
456  s_dso_free_list->prev = old_dso;
457  }
458  s_dso_free_list = old_dso;
459  TMSG(LOADMAP, "Deleting unw intervals");
460 
461 #if LOADMAP_DEBUG
462  assert((uintptr_t)end_addr < UINTPTR_MAX) ;
463 #endif
464 
465 #if UW_RECIPE_MAP_DEBUG
466  fprintf(stderr, "hpcrun_loadmap_unmap: '%s' start=%p end=%p\n",
467  lm->name, start_addr, end_addr);
468 #endif
469 
470  hpcrun_loadmap_notify_unmap(start_addr, end_addr);
471 }
472 
473 
474 // used only to add a load module for the kernel
475 uint16_t
476 hpcrun_loadModule_add(const char* name)
477 {
480  return lm->id;
481 }
482 
483 
484 //***************************************************************************
485 //
486 //***************************************************************************
487 
488 void
490 {
491  notification_recipients = NULL; // necessary for forked executable
492 
493  s_loadmap_ptr = &s_loadmap;
494  hpcrun_loadmap_init(s_loadmap_ptr);
495 
496  s_dso_free_list = NULL;
497 }
498 
499 
502 {
503  return s_loadmap_ptr;
504 }
static void hpcrun_loadmap_notify_unmap(void *start, void *end)
Definition: loadmap.c:93
char * name
Definition: loadmap.h:74
void hpcrun_loadmap_notify_register(loadmap_notify_t *n)
Definition: loadmap.c:74
void hpcrun_loadmap_unmap(load_module_t *lm)
Definition: loadmap.c:433
const char * hpcrun_loadmap_findLoadName(const char *name)
Definition: loadmap.c:315
load_module_t * hpcrun_loadmap_findByName(const char *name)
Definition: loadmap.c:287
dso_info_t * hpcrun_dso_new()
Definition: loadmap.c:108
load_module_t * hpcrun_loadModule_new(const char *name)
Definition: loadmap.c:196
dso_info_t * hpcrun_dso_make(const char *name, void **table, struct fnbounds_file_header *fh, void *startaddr, void *endaddr, unsigned long map_size)
Definition: loadmap.c:130
uint16_t hpcrun_loadModule_add(const char *name)
Definition: loadmap.c:476
struct loadmap_notify_t * next
Definition: loadmap.h:246
uint16_t id
Definition: loadmap.h:127
char * name
Definition: loadmap.h:128
static hpcrun_loadmap_t * s_loadmap_ptr
Definition: loadmap.c:66
void hpcrun_loadmap_init(hpcrun_loadmap_t *x)
Definition: loadmap.c:237
loadmap_notify_range_t map
Definition: loadmap.h:244
dso_info_t * dso_info
Definition: loadmap.h:129
void hpcrun_dsoList_dump(dso_info_t *dl_list)
Definition: loadmap.c:174
#define EMSG
Definition: messages.h:70
load_module_t * hpcrun_loadmap_findById(uint16_t id)
Definition: loadmap.c:301
uintptr_t start_to_ref_dist
Definition: loadmap.h:77
load_module_t * hpcrun_loadmap_map(dso_info_t *dso)
Definition: loadmap.c:389
struct load_module_t * next
Definition: loadmap.h:130
int is_relocatable
Definition: loadmap.h:81
void * start_addr
Definition: loadmap.h:75
void * end_addr
Definition: loadmap.h:76
load_module_t * lm_head
Definition: loadmap.h:150
void * hpcrun_malloc(size_t size)
Definition: mem.c:275
void hpcrun_dso_dump(dso_info_t *x)
Definition: loadmap.c:183
void hpcrun_loadmap_print(hpcrun_loadmap_t *loadmap)
Definition: loadmap.c:251
static void hpcrun_loadmap_pushFront(load_module_t *lm)
Definition: loadmap.c:332
#define TMSG(f,...)
Definition: messages.h:93
unsigned long reference_offset
load_module_t * lm_end
Definition: loadmap.h:151
static dso_info_t * s_dso_free_list
Definition: loadmap.c:68
#define NULL
Definition: ElfHelper.cpp:85
void ** table
Definition: loadmap.h:78
static hpcrun_loadmap_t s_loadmap
Definition: loadmap.c:65
unsigned long nsymbols
Definition: loadmap.h:80
uint16_t size
Definition: loadmap.h:149
struct dso_info_t * next
Definition: loadmap.h:83
void hpcrun_initLoadmap()
Definition: loadmap.c:489
load_module_t * hpcrun_loadmap_findByAddr(void *begin, void *end)
Definition: loadmap.c:261
<!-- ********************************************************************--> n<!-- HPCToolkit Experiment DTD --> n<!-- Version 2.1 --> n<!-- ********************************************************************--> n<!ELEMENT HPCToolkitExperiment(Header,(SecCallPathProfile|SecFlatProfile) *)> n<!ATTLIST HPCToolkitExperiment\n version CDATA #REQUIRED > n n<!-- ******************************************************************--> n n<!-- Info/NV:flexible name-value pairs:(n) ame;(t) ype;(v) alue --> n<!ELEMENT Info(NV *)> n<!ATTLIST Info\n n CDATA #IMPLIED > n<!ELEMENT NV EMPTY > n<!ATTLIST NV\n n CDATA #REQUIRED\n t CDATA #IMPLIED\n v CDATA #REQUIRED > n n<!-- ******************************************************************--> n<!-- Header --> n<!-- ******************************************************************--> n<!ELEMENT Header(Info *)> n<!ATTLIST Header\n n CDATA #REQUIRED > n n<!-- ******************************************************************--> n<!-- Section Header --> n<!-- ******************************************************************--> n<!ELEMENT SecHeader(MetricTable?, MetricDBTable?, TraceDBTable?, LoadModuleTable?, FileTable?, ProcedureTable?, Info *)> n n<!-- MetricTable:--> n<!ELEMENT MetricTable(Metric) * > n n<!-- Metric:(i) d;(n) ame --> n<!--(v) alue-type:transient type of values --> n<!--(t) ype:persistent type of metric --> n<!-- fmt:format;show;--> n<!ELEMENT Metric(MetricFormula *, Info?)> n<!ATTLIST Metric\n i CDATA #REQUIRED\n n CDATA #REQUIRED\n es CDATA #IMPLIED\n em CDATA #IMPLIED\n ep CDATA #IMPLIED\n v(raw|final|derived-incr|derived) \"raw\\ t (inclusive|exclusive|nil) \nil\\ partner CDATA #IMPLIED\ fmt CDATA #IMPLIED\ show (1|0) \1\\ show-percent (1|0) \1> n n<!-- MetricFormula represents derived metrics: (t)ype; (frm): formula --> n<!ELEMENT MetricFormula (Info?)> n<!ATTLIST MetricFormula\ t (combine|finalize) \finalize\\ i CDATA #IMPLIED\ frm CDATA #REQUIRED> n n<!-- Metric data, used in sections: (n)ame [from Metric]; (v)alue --> n<!ELEMENT M EMPTY> n<!ATTLIST M\ n CDATA #REQUIRED\ v CDATA #REQUIRED> n n<!-- MetricDBTable: --> n<!ELEMENT MetricDBTable (MetricDB)*> n n<!-- MetricDB: (i)d; (n)ame --> n<!-- (t)ype: persistent type of metric --> n<!-- db-glob: file glob describing files in metric db --> n<!-- db-id: id within metric db --> n<!-- db-num-metrics: number of metrics in db --> n<!-- db-header-sz: size (in bytes) of a db file header --> n<!ELEMENT MetricDB EMPTY> n<!ATTLIST MetricDB\ i CDATA #REQUIRED\ n CDATA #REQUIRED\ t (inclusive|exclusive|nil) \nil\\ partner CDATA #IMPLIED\ db-glob CDATA #IMPLIED\ db-id CDATA #IMPLIED\ db-num-metrics CDATA #IMPLIED\ db-header-sz CDATA #IMPLIED> n n<!-- TraceDBTable: --> n<!ELEMENT TraceDBTable (TraceDB)> n n<!-- TraceDB: (i)d --> n<!-- db-min-time: min beginning time stamp (global) --> n<!-- db-max-time: max ending time stamp (global) --> n<!ELEMENT TraceDB EMPTY> n<!ATTLIST TraceDB\ i CDATA #REQUIRED\ db-glob CDATA #IMPLIED\ db-min-time CDATA #IMPLIED\ db-max-time CDATA #IMPLIED\ db-header-sz CDATA #IMPLIED> n n<!-- LoadModuleTable assigns a short name to a load module --> n<!ELEMENT LoadModuleTable (LoadModule)*> n n<!ELEMENT LoadModule (Info?)> n<!ATTLIST LoadModule\ i CDATA #REQUIRED\ n CDATA #REQUIRED> n n<!-- FileTable assigns a short name to a file --> n<!ELEMENT FileTable (File)*> n n<!ELEMENT File (Info?)> n<!ATTLIST File\ i CDATA #REQUIRED\ n CDATA #REQUIRED> n n<!-- ProcedureTable assigns a short name to a procedure --> n<!ELEMENT ProcedureTable (Procedure)*> n n<!-- Info/NV: flexible name-value pairs: (n)ame; (t)ype; (v)alue --> n<!-- f: family of the procedure (fake, root, ...)--> n<!ELEMENT Procedure (Info?)> n<!ATTLIST Procedure\ i CDATA #REQUIRED\ n CDATA #REQUIRED\ f CDATA #IMPLIED> n n<!-- ****************************************************************** --> n<!-- Section: Call path profile --> n<!-- ****************************************************************** --> n<!ELEMENT SecCallPathProfile (SecHeader, SecCallPathProfileData)> n<!ATTLIST SecCallPathProfile\ i CDATA #REQUIRED\ n CDATA #REQUIRED> n n<!ELEMENT SecCallPathProfileData (PF|M)*> n<!-- Procedure frame --> n<!-- (i)d: unique identifier for cross referencing --> n<!-- (s)tatic scope id --> n<!-- (n)ame: a string or an id in ProcedureTable --> n<!-- (lm) load module: a string or an id in LoadModuleTable --> n<!-- (f)ile name: a string or an id in LoadModuleTable --> n<!-- (l)ine range: \beg-end\ (inclusive range) --> n<!-- (a)lien: whether frame is alien to enclosing P --> n<!-- (str)uct: hpcstruct node id --> n<!-- (t)ype: hpcrun node type: memory access, variable declaration, ... --> n<!-- (v)ma-range-set: \{[beg-end), [beg-end)...}\ --> n<!ELEMENT PF (PF|Pr|L|C|S|M)*> n<!ATTLIST PF\ i CDATA #IMPLIED\ s CDATA #IMPLIED\ n CDATA #REQUIRED\ lm CDATA #IMPLIED\ f CDATA #IMPLIED\ l CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Procedure (static): GOAL: replace with 'P' --> n<!ELEMENT Pr (Pr|L|C|S|M)*> n<!ATTLIST Pr\ i CDATA #IMPLIED\ s CDATA #IMPLIED\ n CDATA #REQUIRED\ lm CDATA #IMPLIED\ f CDATA #IMPLIED\ l CDATA #IMPLIED\ a (1|0) \0\\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Callsite (a special StatementRange) --> n<!ELEMENT C (PF|M)*> n<!ATTLIST C\ i CDATA #IMPLIED\ s CDATA #IMPLIED\ l CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n n<!-- ****************************************************************** --> n<!-- Section: Flat profile --> n<!-- ****************************************************************** --> n<!ELEMENT SecFlatProfile (SecHeader, SecFlatProfileData)> n<!ATTLIST SecFlatProfile\ i CDATA #REQUIRED\ n CDATA #REQUIRED> n n<!ELEMENT SecFlatProfileData (LM|M)*> n<!-- Load module: (i)d; (n)ame; (v)ma-range-set --> n<!ELEMENT LM (F|P|M)*> n<!ATTLIST LM\ i CDATA #IMPLIED\ n CDATA #REQUIRED\ v CDATA #IMPLIED> n<!-- File --> n<!ELEMENT F (P|L|S|M)*> n<!ATTLIST F\ i CDATA #IMPLIED\ n CDATA #REQUIRED> n<!-- Procedure (Note 1) --> n<!ELEMENT P (P|A|L|S|C|M)*> n<!ATTLIST P\ i CDATA #IMPLIED\ n CDATA #REQUIRED\ l CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Alien (Note 1) --> n<!ELEMENT A (A|L|S|C|M)*> n<!ATTLIST A\ i CDATA #IMPLIED\ f CDATA #IMPLIED\ n CDATA #IMPLIED\ l CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Loop (Note 1,2) --> n<!ELEMENT L (A|Pr|L|S|C|M)*> n<!ATTLIST L\ i CDATA #IMPLIED\ s CDATA #IMPLIED\ l CDATA #IMPLIED\ f CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Statement (Note 2) --> n<!-- (it): trace record identifier --> n<!ELEMENT S (S|M)*> n<!ATTLIST S\ i CDATA #IMPLIED\ it CDATA #IMPLIED\ s CDATA #IMPLIED\ l CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Note 1: Contained Cs may not contain PFs --> n<!-- Note 2: The 's' attribute is not used for flat profiles --> n
static void hpcrun_loadmap_notify_map(void *start, void *end)
Definition: loadmap.c:82
struct dso_info_t * prev
Definition: loadmap.h:84
struct load_module_t * prev
Definition: loadmap.h:131
hpcrun_loadmap_t * hpcrun_loadmap_new()
Definition: loadmap.c:221
unsigned long map_size
Definition: loadmap.h:79
static loadmap_notify_t * notification_recipients
Definition: loadmap.c:71
loadmap_notify_range_t unmap
Definition: loadmap.h:245
hpcrun_loadmap_t * hpcrun_getLoadmap()
Definition: loadmap.c:501