HPCToolkit
unwindr_info.h File Reference
#include <inttypes.h>
#include "binarytree_uwi.h"
#include <hpcrun/loadmap.h>
#include "interval_t.h"
Include dependency graph for unwindr_info.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  unwindr_info_s
 

Typedefs

typedef struct unwindr_info_s unwindr_info_t
 

Enumerations

enum  tree_stat_t { NEVER, DEFERRED, FORTHCOMING, READY }
 

Typedef Documentation

◆ unwindr_info_t

Enumeration Type Documentation

◆ tree_stat_t

So far, we have used NEVER to indicate regions of the address space where we cannot compute unwind intervals. Regions outside the segments where code is mapped are marked NEVER.

Similarly, if we can’t compute function bounds for a segment (i.e., VDSO), we will also create a region marked NEVER. The reason we use NEVER is that we don’t want to continue trying to build function bounds or intervals for a region in the address space where it will never succeed.

When we want to enter unwind intervals for a function into the cskiplist, we insert a record into the cskiplist that says

stat: DEFERRED bounds [lower, upper)

The DEFERRED status means that no unwind intervals are currently available for the function range and no one is computing them.

In the code below, any thread that comes along and wants the unwind intervals for a region that is DEFERRED offers to compute them by executing a compare-and-swap (CAS) to change DEFERRED to FORTHCOMING. Multiple threads may try at once. Only one CAS will succeed and the “winner” with the successful CAS will build the intervals. All other threads that need them will wait until the FORTHCOMING intervals are computed, added to the skiplist node and published by marking the node READY.

Enumerator
NEVER 
DEFERRED 
FORTHCOMING 
READY 

Definition at line 95 of file unwindr_info.h.