Lines Matching full:origin

9 // Origin id utils.
19 // Origin handling.
21 // Origin is a 32-bit identifier that is attached to any uninitialized value in
25 // There are 3 kinds of origin ids:
26 // 1xxx xxxx xxxx xxxx heap origin id
27 // 0000 xxxx xxxx xxxx stack origin id
28 // 0zzz xxxx xxxx xxxx chained origin id
30 // Heap origin id describes a heap memory allocation and contains (in the xxx
33 // Stack origin id describes a stack memory allocation and contains (in the xxx
37 // Chained origin id describes an event of storing an uninitialized value to
42 // * prev_id is another origin id that describes the earlier part of the
48 // points in value history marked with origin ids, and edges are events that are
51 // The "zzz" bits of chained origin id are used to store the length (or depth)
52 // of the origin chain.
54 class Origin {
84 // Returns the next origin in the chain and the current stack trace.
85 Origin getNextChainedOrigin(StackTrace *stack) const { in getNextChainedOrigin()
90 return Origin(prev_id); in getNextChainedOrigin()
97 static Origin CreateStackOrigin(u32 id) { in CreateStackOrigin()
99 return Origin((1 << kHeapShift) | id); in CreateStackOrigin()
102 static Origin CreateHeapOrigin(StackTrace *stack) { in CreateHeapOrigin()
106 return Origin(stack_id); in CreateHeapOrigin()
109 static Origin CreateChainedOrigin(Origin prev, StackTrace *stack) { in CreateChainedOrigin()
137 return Origin((1 << kHeapShift) | (depth << kDepthShift) | chained_id); in CreateChainedOrigin()
140 static Origin FromRawId(u32 id) { in FromRawId()
141 return Origin(id); in FromRawId()
155 explicit Origin(u32 raw_id) : raw_id_(raw_id) {} in Origin() function