/home/travis/build/MoarVM/MoarVM/src/core/callstack.h
Line | Count | Source |
1 | | /* A region of the call stack, used for call frames that have not escaped to |
2 | | * the heap. */ |
3 | | struct MVMCallStackRegion { |
4 | | /* Next call stack region, which we start allocating in if this one is |
5 | | * full. NULL if none has been allocated yet. */ |
6 | | MVMCallStackRegion *next; |
7 | | |
8 | | /* Previous call stack region, if any. */ |
9 | | MVMCallStackRegion *prev; |
10 | | |
11 | | /* The place we'll allocate the next frame. */ |
12 | | char *alloc; |
13 | | |
14 | | /* The end of the allocatable region. */ |
15 | | char *alloc_limit; |
16 | | }; |
17 | | |
18 | | /* The default size of a call stack region. */ |
19 | 260 | #define MVM_CALLSTACK_REGION_SIZE 131072 |
20 | | |
21 | | /* Checks if a frame is allocated on a call stack or on the heap. If it is on |
22 | | * the call stack, then it will have zeroed flags (since heap-allocated frames |
23 | | * always have the "I'm a heap frame" bit set). */ |
24 | 14.2M | MVM_STATIC_INLINE MVMuint32 MVM_FRAME_IS_ON_CALLSTACK(MVMThreadContext *tc, MVMFrame *frame) { |
25 | 14.2M | return frame->header.flags == 0; |
26 | 14.2M | } Unexecuted instantiation: NativeRef.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: CUnion.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: ReentrantMutex.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: ConditionVariable.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: Semaphore.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: ConcBlockingQueue.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MVMAsyncTask.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MVMNull.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: CPPStruct.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: CStruct.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MultiDimArray.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: Decoder.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: 6model.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: bootstrap.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: sc.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: serialization.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: compiler.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: driver.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MVMException.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MVMThread.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MVMIter.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MVMContext.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: SCRef.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: Lexotic.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MVMCallCapture.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: P6bigint.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: NFA.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: dump.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MVMDLLSym.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MVMMultiCache.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MVMContinuation.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: NativeCall.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: CPointer.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: CStr.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: CArray.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: profile.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: nfg.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: unicode.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: normalize.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: latin1.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: utf16.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: windows1252.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: bigintops.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: instrument.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: utf8_c8.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: heapsnapshot.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: crossthreadwrite.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: line_coverage.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: moar.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: mmap.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: time.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: sys.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: emit_posix_x64.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: threshold.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: graph.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: codegen.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: candidate.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: manipulate.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: facts.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: optimize.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: deopt.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: log.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: HashAttrStore.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: inline.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: osr.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: lookup.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: compile.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: decode_stream.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: ascii.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: utf8.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: orchestrate.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: ext.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: nativecall.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: nativecall_dyncall.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: continuation.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: intcache.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: fixedsizealloc.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: regionalloc.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: config.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: dll.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: allocation.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: worklist.c:MVM_FRAME_IS_ON_CALLSTACK roots.c:MVM_FRAME_IS_ON_CALLSTACK Line | Count | Source | 24 | 151k | MVM_STATIC_INLINE MVMuint32 MVM_FRAME_IS_ON_CALLSTACK(MVMThreadContext *tc, MVMFrame *frame) { | 25 | 151k | return frame->header.flags == 0; | 26 | 151k | } |
collect.c:MVM_FRAME_IS_ON_CALLSTACK Line | Count | Source | 24 | 1.13k | MVM_STATIC_INLINE MVMuint32 MVM_FRAME_IS_ON_CALLSTACK(MVMThreadContext *tc, MVMFrame *frame) { | 25 | 1.13k | return frame->header.flags == 0; | 26 | 1.13k | } |
Unexecuted instantiation: gen2.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: wb.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: objectid.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: finalize.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: validation.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: args.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: exceptions.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: interp.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: threadcontext.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: compunit.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: bytecode.c:MVM_FRAME_IS_ON_CALLSTACK frame.c:MVM_FRAME_IS_ON_CALLSTACK Line | Count | Source | 24 | 14.0M | MVM_STATIC_INLINE MVMuint32 MVM_FRAME_IS_ON_CALLSTACK(MVMThreadContext *tc, MVMFrame *frame) { | 25 | 14.0M | return frame->header.flags == 0; | 26 | 14.0M | } |
Unexecuted instantiation: callstack.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: debug.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: bytecodedump.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: threads.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: ops.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: hll.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: loadbytecode.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: num.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: coerce.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: P6opaque.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: parametric.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MVMString.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: VMArray.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MVMHash.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MVMCFunction.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: KnowHOWREPR.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: KnowHOWAttributeREPR.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: P6str.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: containers.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MVMCode.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MVMOSHandle.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MVMCompUnit.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: MVMStaticFrame.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: P6int.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: P6num.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: Uninstantiable.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: procops.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: io.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: eventloop.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: syncfile.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: syncstream.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: syncpipe.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: syncsocket.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: fileops.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: dirops.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: callsite.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: timers.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: filewatchers.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: signals.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: asyncsocket.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: asyncsocketudp.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: reprs.c:MVM_FRAME_IS_ON_CALLSTACK Unexecuted instantiation: reprconv.c:MVM_FRAME_IS_ON_CALLSTACK |
27 | | |
28 | | /* Functions for working with call stack regions. */ |
29 | | void MVM_callstack_region_init(MVMThreadContext *tc); |
30 | | MVMCallStackRegion * MVM_callstack_region_next(MVMThreadContext *tc); |
31 | | MVMCallStackRegion * MVM_callstack_region_prev(MVMThreadContext *tc); |
32 | | void MVM_callstack_reset(MVMThreadContext *tc); |
33 | | void MVM_callstack_region_destroy_all(MVMThreadContext *tc); |