Line data Source code
1 : #ifndef HEADER_fd_src_flamenco_runtime_context_fd_capture_ctx_h 2 : #define HEADER_fd_src_flamenco_runtime_context_fd_capture_ctx_h 3 : 4 : #include "../../capture/fd_solcap_writer.h" 5 : #include "../../../funk/fd_funk_base.h" 6 : 7 : /* Context needed to do solcap capture during execution of transactions */ 8 0 : #define FD_CAPTURE_CTX_ALIGN (8UL) 9 : struct __attribute__((aligned(FD_CAPTURE_CTX_ALIGN))) fd_capture_ctx { 10 : ulong magic; /* ==FD_CAPTURE_CTX_MAGIC */ 11 : 12 : /* Solcap */ 13 : int trace_dirfd; 14 : int trace_mode; 15 : fd_solcap_writer_t * capture; 16 : int capture_txns; /* Capturing txns can add significant time */ 17 : 18 : /* Checkpointing */ 19 : ulong checkpt_freq; /* Must be a rooted slot */ 20 : char const * checkpt_path; /* Wksp checkpoint format */ 21 : char const * checkpt_archive; /* Funk archive format */ 22 : 23 : /* Prune */ 24 : fd_funk_t * pruned_funk; /* Capturing accessed accounts during execution*/ 25 : 26 : /*======== PROTOBUF ========*/ 27 : char const * dump_proto_output_dir; 28 : char const * dump_proto_sig_filter; 29 : ulong dump_proto_start_slot; 30 : 31 : /* Instruction Capture */ 32 : int dump_insn_to_pb; 33 : 34 : /* Transaction Capture */ 35 : int dump_txn_to_pb; 36 : }; 37 : typedef struct fd_capture_ctx fd_capture_ctx_t; 38 0 : #define FD_CAPTURE_CTX_FOOTPRINT ( sizeof(fd_capture_ctx_t) + fd_solcap_writer_footprint() ) 39 0 : #define FD_CAPTURE_CTX_MAGIC (0x193ECD2A6C395195UL) /* random */ 40 : 41 : FD_PROTOTYPES_BEGIN 42 : 43 : void * 44 : fd_capture_ctx_new( void * mem ); 45 : 46 : fd_capture_ctx_t * 47 : fd_capture_ctx_join( void * mem ); 48 : 49 : void * 50 : fd_capture_ctx_leave( fd_capture_ctx_t * ctx ); 51 : 52 : void * 53 : fd_capture_ctx_delete( void * mem ); 54 : 55 : FD_PROTOTYPES_END 56 : 57 : #endif /* HEADER_fd_src_flamenco_runtime_context_fd_capture_ctx_h */