/home/travis/build/MoarVM/MoarVM/src/spesh/log.h
Line | Count | Source |
1 | | /* Information about an inserted guard instruction due to logging. */ |
2 | | struct MVMSpeshLogGuard { |
3 | | /* Instruction and containing basic block. */ |
4 | | MVMSpeshIns *ins; |
5 | | MVMSpeshBB *bb; |
6 | | |
7 | | /* Have we made use of the gurad? */ |
8 | | MVMuint32 used; |
9 | | }; |
10 | | |
11 | | /* The default number of entries collected into a thread's spesh log buffer |
12 | | * before it is sent to a specialization worker. */ |
13 | 3.72k | #define MVM_SPESH_LOG_DEFAULT_ENTRIES 16384 |
14 | | |
15 | | /* The number of spesh log buffers a thread can write before the spesh worker |
16 | | * thread allows it to write more (effectively, the limit on the number of |
17 | | * outstanding work per thread). Threads other than the main one getting a |
18 | | * bit less buffer space helps reduce memory use a bit. */ |
19 | 144 | #define MVM_SPESH_LOG_QUOTA_MAIN_THREAD 2 |
20 | 196 | #define MVM_SPESH_LOG_QUOTA 1 |
21 | | |
22 | | /* The number of logged invocations before we decide we've enough data for |
23 | | * the time being; should be at least the maximum threshold value in |
24 | | * thresholds.c, but we set it higher to allow more data collection. */ |
25 | 5.72M | #define MVM_SPESH_LOG_LOGGED_ENOUGH 1000 |
26 | | |
27 | | /* Quick check if we are logging, to save function call overhead. */ |
28 | 44.5M | MVM_STATIC_INLINE MVMint32 MVM_spesh_log_is_logging(MVMThreadContext *tc) { |
29 | 44.5M | MVMFrame *cur_frame = tc->cur_frame; |
30 | 43.2M | return cur_frame->spesh_cand == NULL && cur_frame->spesh_correlation_id && tc->spesh_log; |
31 | 44.5M | } Unexecuted instantiation: facts.c:MVM_spesh_log_is_logging Unexecuted instantiation: sc.c:MVM_spesh_log_is_logging Unexecuted instantiation: serialization.c:MVM_spesh_log_is_logging Unexecuted instantiation: compiler.c:MVM_spesh_log_is_logging Unexecuted instantiation: driver.c:MVM_spesh_log_is_logging Unexecuted instantiation: dump.c:MVM_spesh_log_is_logging Unexecuted instantiation: graph.c:MVM_spesh_log_is_logging Unexecuted instantiation: codegen.c:MVM_spesh_log_is_logging Unexecuted instantiation: candidate.c:MVM_spesh_log_is_logging Unexecuted instantiation: manipulate.c:MVM_spesh_log_is_logging Unexecuted instantiation: bootstrap.c:MVM_spesh_log_is_logging Unexecuted instantiation: optimize.c:MVM_spesh_log_is_logging Unexecuted instantiation: dead_bb_elimination.c:MVM_spesh_log_is_logging Unexecuted instantiation: deopt.c:MVM_spesh_log_is_logging Unexecuted instantiation: log.c:MVM_spesh_log_is_logging Unexecuted instantiation: threshold.c:MVM_spesh_log_is_logging Unexecuted instantiation: inline.c:MVM_spesh_log_is_logging Unexecuted instantiation: osr.c:MVM_spesh_log_is_logging Unexecuted instantiation: lookup.c:MVM_spesh_log_is_logging Unexecuted instantiation: iterator.c:MVM_spesh_log_is_logging Unexecuted instantiation: ConcBlockingQueue.c:MVM_spesh_log_is_logging Unexecuted instantiation: NativeCall.c:MVM_spesh_log_is_logging Unexecuted instantiation: CPointer.c:MVM_spesh_log_is_logging Unexecuted instantiation: CStr.c:MVM_spesh_log_is_logging Unexecuted instantiation: CArray.c:MVM_spesh_log_is_logging Unexecuted instantiation: CStruct.c:MVM_spesh_log_is_logging Unexecuted instantiation: CUnion.c:MVM_spesh_log_is_logging Unexecuted instantiation: ReentrantMutex.c:MVM_spesh_log_is_logging Unexecuted instantiation: ConditionVariable.c:MVM_spesh_log_is_logging Unexecuted instantiation: Semaphore.c:MVM_spesh_log_is_logging Unexecuted instantiation: worker.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMAsyncTask.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMNull.c:MVM_spesh_log_is_logging Unexecuted instantiation: CPPStruct.c:MVM_spesh_log_is_logging Unexecuted instantiation: NativeRef.c:MVM_spesh_log_is_logging Unexecuted instantiation: MultiDimArray.c:MVM_spesh_log_is_logging Unexecuted instantiation: Decoder.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMSpeshLog.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMStaticFrameSpesh.c:MVM_spesh_log_is_logging Unexecuted instantiation: 6model.c:MVM_spesh_log_is_logging Unexecuted instantiation: mmap.c:MVM_spesh_log_is_logging Unexecuted instantiation: profile.c:MVM_spesh_log_is_logging Unexecuted instantiation: heapsnapshot.c:MVM_spesh_log_is_logging Unexecuted instantiation: telemeh.c:MVM_spesh_log_is_logging Unexecuted instantiation: crossthreadwrite.c:MVM_spesh_log_is_logging Unexecuted instantiation: line_coverage.c:MVM_spesh_log_is_logging Unexecuted instantiation: sys.c:MVM_spesh_log_is_logging Unexecuted instantiation: random.c:MVM_spesh_log_is_logging Unexecuted instantiation: memmem32.c:MVM_spesh_log_is_logging Unexecuted instantiation: moar.c:MVM_spesh_log_is_logging Unexecuted instantiation: instrument.c:MVM_spesh_log_is_logging Unexecuted instantiation: time.c:MVM_spesh_log_is_logging Unexecuted instantiation: label.c:MVM_spesh_log_is_logging Unexecuted instantiation: compile.c:MVM_spesh_log_is_logging Unexecuted instantiation: expr.c:MVM_spesh_log_is_logging Unexecuted instantiation: tile.c:MVM_spesh_log_is_logging Unexecuted instantiation: linear_scan.c:MVM_spesh_log_is_logging Unexecuted instantiation: interface.c:MVM_spesh_log_is_logging Unexecuted instantiation: emit.c:MVM_spesh_log_is_logging Unexecuted instantiation: arch.c:MVM_spesh_log_is_logging Unexecuted instantiation: nfg.c:MVM_spesh_log_is_logging Unexecuted instantiation: stats.c:MVM_spesh_log_is_logging Unexecuted instantiation: plan.c:MVM_spesh_log_is_logging Unexecuted instantiation: arg_guard.c:MVM_spesh_log_is_logging plugin.c:MVM_spesh_log_is_logging Line | Count | Source | 28 | 95.6k | MVM_STATIC_INLINE MVMint32 MVM_spesh_log_is_logging(MVMThreadContext *tc) { | 29 | 95.6k | MVMFrame *cur_frame = tc->cur_frame; | 30 | 95.6k | return cur_frame->spesh_cand == NULL && cur_frame->spesh_correlation_id && tc->spesh_log; | 31 | 95.6k | } |
Unexecuted instantiation: decode_stream.c:MVM_spesh_log_is_logging Unexecuted instantiation: ascii.c:MVM_spesh_log_is_logging Unexecuted instantiation: parse_num.c:MVM_spesh_log_is_logging Unexecuted instantiation: utf8.c:MVM_spesh_log_is_logging Unexecuted instantiation: utf8_c8.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMContinuation.c:MVM_spesh_log_is_logging Unexecuted instantiation: unicode.c:MVM_spesh_log_is_logging Unexecuted instantiation: normalize.c:MVM_spesh_log_is_logging Unexecuted instantiation: latin1.c:MVM_spesh_log_is_logging Unexecuted instantiation: utf16.c:MVM_spesh_log_is_logging Unexecuted instantiation: windows1252.c:MVM_spesh_log_is_logging Unexecuted instantiation: shiftjis.c:MVM_spesh_log_is_logging Unexecuted instantiation: shiftjis_codeindex.c:MVM_spesh_log_is_logging Unexecuted instantiation: bigintops.c:MVM_spesh_log_is_logging Unexecuted instantiation: roots.c:MVM_spesh_log_is_logging Unexecuted instantiation: continuation.c:MVM_spesh_log_is_logging Unexecuted instantiation: intcache.c:MVM_spesh_log_is_logging Unexecuted instantiation: fixedsizealloc.c:MVM_spesh_log_is_logging Unexecuted instantiation: regionalloc.c:MVM_spesh_log_is_logging Unexecuted instantiation: debugserver.c:MVM_spesh_log_is_logging Unexecuted instantiation: config.c:MVM_spesh_log_is_logging Unexecuted instantiation: orchestrate.c:MVM_spesh_log_is_logging Unexecuted instantiation: allocation.c:MVM_spesh_log_is_logging Unexecuted instantiation: worklist.c:MVM_spesh_log_is_logging Unexecuted instantiation: nativecall_dyncall.c:MVM_spesh_log_is_logging Unexecuted instantiation: collect.c:MVM_spesh_log_is_logging Unexecuted instantiation: gen2.c:MVM_spesh_log_is_logging Unexecuted instantiation: wb.c:MVM_spesh_log_is_logging Unexecuted instantiation: objectid.c:MVM_spesh_log_is_logging Unexecuted instantiation: finalize.c:MVM_spesh_log_is_logging Unexecuted instantiation: debug.c:MVM_spesh_log_is_logging Unexecuted instantiation: io.c:MVM_spesh_log_is_logging Unexecuted instantiation: eventloop.c:MVM_spesh_log_is_logging Unexecuted instantiation: syncfile.c:MVM_spesh_log_is_logging Unexecuted instantiation: bytecodedump.c:MVM_spesh_log_is_logging Unexecuted instantiation: args.c:MVM_spesh_log_is_logging Unexecuted instantiation: exceptions.c:MVM_spesh_log_is_logging interp.c:MVM_spesh_log_is_logging Line | Count | Source | 28 | 44.4M | MVM_STATIC_INLINE MVMint32 MVM_spesh_log_is_logging(MVMThreadContext *tc) { | 29 | 44.4M | MVMFrame *cur_frame = tc->cur_frame; | 30 | 43.1M | return cur_frame->spesh_cand == NULL && cur_frame->spesh_correlation_id && tc->spesh_log; | 31 | 44.4M | } |
Unexecuted instantiation: threadcontext.c:MVM_spesh_log_is_logging Unexecuted instantiation: compunit.c:MVM_spesh_log_is_logging Unexecuted instantiation: bytecode.c:MVM_spesh_log_is_logging Unexecuted instantiation: frame.c:MVM_spesh_log_is_logging Unexecuted instantiation: callstack.c:MVM_spesh_log_is_logging Unexecuted instantiation: validation.c:MVM_spesh_log_is_logging Unexecuted instantiation: syncsocket.c:MVM_spesh_log_is_logging Unexecuted instantiation: threads.c:MVM_spesh_log_is_logging Unexecuted instantiation: ops.c:MVM_spesh_log_is_logging Unexecuted instantiation: hll.c:MVM_spesh_log_is_logging Unexecuted instantiation: loadbytecode.c:MVM_spesh_log_is_logging Unexecuted instantiation: num.c:MVM_spesh_log_is_logging Unexecuted instantiation: coerce.c:MVM_spesh_log_is_logging Unexecuted instantiation: dll.c:MVM_spesh_log_is_logging Unexecuted instantiation: ext.c:MVM_spesh_log_is_logging Unexecuted instantiation: nativecall.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMThread.c:MVM_spesh_log_is_logging Unexecuted instantiation: P6opaque.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMCode.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMOSHandle.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMCompUnit.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMStaticFrame.c:MVM_spesh_log_is_logging Unexecuted instantiation: P6int.c:MVM_spesh_log_is_logging Unexecuted instantiation: P6num.c:MVM_spesh_log_is_logging Unexecuted instantiation: Uninstantiable.c:MVM_spesh_log_is_logging Unexecuted instantiation: HashAttrStore.c:MVM_spesh_log_is_logging Unexecuted instantiation: P6str.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMIter.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMContext.c:MVM_spesh_log_is_logging Unexecuted instantiation: SCRef.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMCallCapture.c:MVM_spesh_log_is_logging Unexecuted instantiation: P6bigint.c:MVM_spesh_log_is_logging Unexecuted instantiation: NFA.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMException.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMDLLSym.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMMultiCache.c:MVM_spesh_log_is_logging Unexecuted instantiation: reprconv.c:MVM_spesh_log_is_logging Unexecuted instantiation: fileops.c:MVM_spesh_log_is_logging Unexecuted instantiation: dirops.c:MVM_spesh_log_is_logging Unexecuted instantiation: procops.c:MVM_spesh_log_is_logging Unexecuted instantiation: timers.c:MVM_spesh_log_is_logging Unexecuted instantiation: filewatchers.c:MVM_spesh_log_is_logging Unexecuted instantiation: signals.c:MVM_spesh_log_is_logging Unexecuted instantiation: asyncsocket.c:MVM_spesh_log_is_logging Unexecuted instantiation: asyncsocketudp.c:MVM_spesh_log_is_logging Unexecuted instantiation: reprs.c:MVM_spesh_log_is_logging Unexecuted instantiation: callsite.c:MVM_spesh_log_is_logging Unexecuted instantiation: containers.c:MVM_spesh_log_is_logging Unexecuted instantiation: parametric.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMString.c:MVM_spesh_log_is_logging Unexecuted instantiation: VMArray.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMHash.c:MVM_spesh_log_is_logging Unexecuted instantiation: MVMCFunction.c:MVM_spesh_log_is_logging Unexecuted instantiation: KnowHOWREPR.c:MVM_spesh_log_is_logging Unexecuted instantiation: KnowHOWAttributeREPR.c:MVM_spesh_log_is_logging |
32 | | |
33 | | void MVM_spesh_log_initialize_thread(MVMThreadContext *tc, MVMint32 main_thread); |
34 | | MVMSpeshLog * MVM_spesh_log_create(MVMThreadContext *tc, MVMThread *target_thread); |
35 | | void MVM_spesh_log_new_compunit(MVMThreadContext *tc); |
36 | | void MVM_spesh_log_entry(MVMThreadContext *tc, MVMint32 cid, MVMStaticFrame *sf, MVMCallsite *cs); |
37 | | void MVM_spesh_log_osr(MVMThreadContext *tc); |
38 | | void MVM_spesh_log_parameter(MVMThreadContext *tc, MVMuint16 arg_idx, MVMObject *param); |
39 | | void MVM_spesh_log_type(MVMThreadContext *tc, MVMObject *value); |
40 | | void MVM_spesh_log_static(MVMThreadContext *tc, MVMObject *value); |
41 | | void MVM_spesh_log_decont(MVMThreadContext *tc, MVMuint8 *prev_op, MVMObject *value); |
42 | | void MVM_spesh_log_invoke_target(MVMThreadContext *tc, MVMObject *invoke_target, |
43 | | MVMuint16 was_multi); |
44 | | void MVM_spesh_log_return_type(MVMThreadContext *tc, MVMObject *value); |
45 | | void MVM_spesh_log_plugin_resolution(MVMThreadContext *tc, MVMuint32 bytecode_offset, |
46 | | MVMuint16 guard_index); |