package core:sys/valgrind

Warning: This was generated for -target:windows_amd64 and might not represet every target this package supports.

⌘K
Ctrl+K
or
/

    Index

    Constants (0)

    This section is empty.

    Variables (0)

    This section is empty.

    Procedures (92)
    Procedure Groups (0)

    This section is empty.

    Types

    Callgrind_Client_Request ¶

    Callgrind_Client_Request :: enum uintptr {
    	Dump_Stats            = 1129578496, 
    	Zero_Stats, 
    	Toggle_Collect, 
    	Dump_Stats_At, 
    	Start_Instrumentation, 
    	Stop_Instrumentation, 
    }
    Related Procedures With Parameters

    Client_Request ¶

    Client_Request :: enum uintptr {
    	Running_On_Valgrind            = 4097, 
    	Discard_Translations           = 4098, 
    	Client_Call0                   = 4353, 
    	Client_Call1                   = 4354, 
    	Client_Call2                   = 4355, 
    	Client_Call3                   = 4356, 
    	Count_Errors                   = 4609, 
    	Gdb_Monitor_Command            = 4610, 
    	Malloc_Like_Block              = 4865, 
    	Resize_Inplace_Block           = 4875, 
    	Free_Like_Block                = 4866, 
    	Create_Mem_Pool                = 4867, 
    	Destroy_Mem_Pool               = 4868, 
    	Mem_Pool_Alloc                 = 4869, 
    	Mem_Pool_Free                  = 4870, 
    	Mem_Pool_Trim                  = 4871, 
    	Move_Mem_Pool                  = 4872, 
    	Mem_Pool_Change                = 4873, 
    	Mem_Pool_Exists                = 4874, 
    	Printf                         = 5121, 
    	Printf_Backtrace               = 5122, 
    	Printf_Valist_By_Ref           = 5123, 
    	Printf_Backtrace_Valist_By_Ref = 5124, 
    	Stack_Register                 = 5377, 
    	Stack_Deregister               = 5378, 
    	Stack_Change                   = 5379, 
    	Load_Pdb_Debug_Info            = 5633, 
    	Map_Ip_To_Src_Loc              = 5889, 
    	Change_Err_Disablement         = 6145, 
    	Vex_Init_For_Iri               = 6401, 
    	Inner_Threads                  = 6402, 
    }
    Related Procedures With Parameters

    Count_Result ¶

    Count_Result :: struct {
    	leaked:     uint,
    	dubious:    uint,
    	reachable:  uint,
    	suppressed: uint,
    }
    Related Procedures With Returns

    Helgrind_Client_Request ¶

    Helgrind_Client_Request :: enum uintptr {
    	Clean_Memory                     = 1212612608, 
    	Set_My_pthread_t                 = 2420572416, 
    	Pthread_Join_Post, 
    	Pthread_Mutex_Init_Post, 
    	Pthread_Mutex_Destroy_Pre, 
    	Pthread_Mutex_Unlock_Pre, 
    	Pthread_Mutex_Unlock_Post, 
    	Pthread_Mutex_Lock_Pre, 
    	Pthread_Mutex_Lock_Post, 
    	Pthread_Cond_Signal_Pre, 
    	Pthread_Cond_Broadcast_Pre, 
    	Pthread_Cond_Wait_Pre, 
    	Pthread_Cond_Wait_Post, 
    	Pthread_Cond_Destroy_Pre, 
    	Pthread_Rwlock_Init_Post, 
    	Pthread_Rwlock_Destroy_Pre, 
    	Pthread_Rwlock_Lock_Pre, 
    	Pthread_Rwlock_Lock_Post, 
    	Pthread_Rwlock_Unlock_Pre, 
    	Pthread_Rwlock_Unlock_Post, 
    	Posix_Sem_Init_Post, 
    	Posix_Sem_Destroy_Pre, 
    	Posix_Sem_Post_Pre, 
    	Posix_Sem_Wait_Post, 
    	Pthread_Barrier_Init_Pre, 
    	Pthread_Barrier_Wait_Pre, 
    	Pthread_Barrier_Destroy_Pre, 
    	Pthread_Spin_Init_Or_Unlock_Pre, 
    	Pthread_Spin_Init_Or_Unlock_Post, 
    	Pthread_Spin_Lock_Pre, 
    	Pthread_Spin_Lock_Post, 
    	Pthread_Spin_Destroy_Pre, 
    	Clientreq_Unimp, 
    	Userso_Send_Pre, 
    	Userso_Recv_Post, 
    	Userso_Forget_All, 
    	Reserved2, 
    	Reserved3, 
    	Reserved4, 
    	Arange_Make_Untracked, 
    	Arange_Make_Tracked, 
    	Pthread_Barrier_Resize_Pre, 
    	Clean_Memory_Heapblock, 
    	Pthread_Cond_Init_Post, 
    }
    Related Procedures With Parameters

    Mem_Check_Client_Request ¶

    Mem_Check_Client_Request :: enum uintptr {
    	Make_Mem_No_Access                    = 1296236544, 
    	Make_Mem_Undefined, 
    	Make_Mem_Defined, 
    	Discard, 
    	Check_Mem_Is_Addressable, 
    	Check_Mem_Is_Defined, 
    	Do_Leak_Check, 
    	Count_Leaks, 
    	Get_Vbits, 
    	Set_Vbits, 
    	Create_Block, 
    	Make_Mem_Defined_If_Addressable, 
    	Count_Leak_Blocks, 
    	Enable_Addr_Error_Reporting_In_Range, 
    	Disable_Addr_Error_Reporting_In_Range, 
    }
    Related Procedures With Parameters

    Mem_Pool_Flag ¶

    Mem_Pool_Flag :: enum uintptr {
    	Auto_Free = 0, 
    	Meta_Pool = 1, 
    }

    Mem_Pool_Flags ¶

    Mem_Pool_Flags :: distinct bit_set[Mem_Pool_Flag; uintptr]
    Related Procedures With Parameters

    Constants

    This section is empty.

    Variables

    This section is empty.

    Procedures

    added_leak_check ¶

    added_leak_check :: proc "c" () {…}
     

    Same as leak_check() but only showing the entries for which there was an increase in leaked bytes or leaked nr of blocks since the previous leak search.

    callgrind_client_request_expr ¶

    callgrind_client_request_expr :: proc "c" (
    	default:        uintptr, 
    	request:        Callgrind_Client_Request, 
    	a0, a1, a2, a3, 
    	a4:             uintptr, 
    ) -> uintptr {…}

    callgrind_client_request_stmt ¶

    callgrind_client_request_stmt :: proc "c" (
    	request:        Callgrind_Client_Request, 
    	a0, a1, a2, a3, 
    	a4:             uintptr, 
    ) {…}

    changed_leak_check ¶

    changed_leak_check :: proc "c" () {…}
     

    Same as added_leak_check() but showing entries with increased or decreased leaked bytes/blocks since previous leak search.

    check_mem_is_addressable ¶

    check_mem_is_addressable :: proc "c" (qzz: []u8) -> uintptr {…}
     

    Check that memory at raw_data(qzz) is addressable for len(qzz) bytes. If suitable addressibility is not established, Valgrind prints an error message and returns the address of the first offending byte. Otherwise it returns zero.

    check_mem_is_defined ¶

    check_mem_is_defined :: proc "c" (qzz: []u8) -> uintptr {…}
     

    Check that memory at raw_data(qzz) is addressable and defined for len(qzz) bytes. If suitable addressibility and definedness are not established, Valgrind prints an error message and returns the address of the first offending byte. Otherwise it returns zero.

    client_request_expr ¶

    client_request_expr :: proc "c" (
    	default:        uintptr, 
    	request:        Client_Request, 
    	a0, a1, a2, a3, 
    	a4:             uintptr, 
    ) -> uintptr {…}

    client_request_stmt ¶

    client_request_stmt :: proc "c" (
    	request:        Client_Request, 
    	a0, a1, a2, a3, 
    	a4:             uintptr, 
    ) {…}

    count_errrors ¶

    count_errrors :: proc "c" () -> uint {…}
     

    Counts the number of errors that have been recorded by a tool.

    count_leak_blocks ¶

    count_leak_blocks :: proc "c" () -> (res: Count_Result) {…}

    count_leaks ¶

    count_leaks :: proc "c" () -> (res: Count_Result) {…}

    create_block ¶

    create_block :: proc "c" (qzz: []u8, desc: cstring) -> bool {…}
     

    Create a block-description handle. The description is an ascii string which is included in any messages pertaining to addresses within the specified memory range. Has no other effect on the properties of the memory range.

    create_mem_pool ¶

    create_mem_pool :: proc "c" (pool: rawptr, rz_b: uintptr, is_zeroed: bool, flags: Mem_Pool_Flags) {…}
     

    Create a memory pool.

    destroy_mem_pool ¶

    destroy_mem_pool :: proc "c" (pool: rawptr) {…}
     

    Destroy a memory pool.

    disable_addr_error_reporting_in_range ¶

    disable_addr_error_reporting_in_range :: proc "c" (qzz: []u8) -> uintptr {…}
     

    Disable reporting of addressing errors in the specified address range.

    disable_error_reporting ¶

    disable_error_reporting :: proc "c" () {…}
     

    Disable error reporting for the current thread/ It behaves in a stack-like way, meaning you can safely call this multiple times given that enable_error_reporting() is called the same number of times to re-enable the error reporting. The first call of this macro disables reporting. Subsequent calls have no effect except to increase the number of enable_error_reporting() calls needed to re-enable reporting. Child threads do not inherit this setting from their parents; they are always created with reporting enabled.

    discard ¶

    discard :: proc "c" (blk_index: uintptr) -> bool {…}
     

    Discard a block-description-handle. Returns true for an invalid handle, false for a valid handle.

    discard_translations ¶

    discard_translations :: proc "c" (qzz: []u8) {…}
     

    Discard translation of code in the slice qzz. Useful if you are debugging a JIT-er or some such, since it provides a way to make sure valgrind will retranslate the invalidated area.

    dump_stats ¶

    dump_stats :: proc "c" () {…}
     

    Dump current state of cost centres, and zero them afterwards.

    dump_stats_at ¶

    dump_stats_at :: proc "c" (pos_str: rawptr) {…}
     

    Dump current state of cost centres, and zero them afterwards. The argument is appended to a string stating the reason which triggered the dump. This string is written as a description field into the profile data dump.

    enable_addr_error_reporting_in_range ¶

    enable_addr_error_reporting_in_range :: proc "c" (qzz: []u8) -> uintptr {…}
     

    (Re-)enable reporting of addressing errors in the specified address range.

    enable_error_reporting ¶

    enable_error_reporting :: proc "c" () {…}
     

    Re-enable error reporting

    free_like_block ¶

    free_like_block :: proc "c" (addr: rawptr, rz_b: uintptr) {…}

    get_vbits ¶

    get_vbits :: proc(zza, zzvbits: []u8) -> u8 {…}
     

    Get the validity data for addresses zza and copy it into the provided zzvbits array. Return values: 0 - if not running on valgrind 1 - success 2 - [previously indicated unaligned arrays; these are now allowed] 3 - if any parts of zzsrc/zzvbits are not addressable. The metadata is not copied in cases 0, 2 or 3 so it should be impossible to segfault your system by using this call.

    helgrind_annotate_condvar_lock_wait ¶

    helgrind_annotate_condvar_lock_wait :: proc "c" (cv: rawptr, lock: rawptr) {…}

    helgrind_annotate_condvar_signal ¶

    helgrind_annotate_condvar_signal :: proc "c" (cv: rawptr) {…}

    helgrind_annotate_condvar_signal_all ¶

    helgrind_annotate_condvar_signal_all :: proc "c" (cv: rawptr) {…}

    helgrind_annotate_condvar_wait ¶

    helgrind_annotate_condvar_wait :: proc "c" (cv: rawptr) {…}

    helgrind_barrier_destroy_pre ¶

    helgrind_barrier_destroy_pre :: proc "c" (bar: rawptr) {…}

    helgrind_barrier_init_pre ¶

    helgrind_barrier_init_pre :: proc "c" (bar: rawptr, count: uint, resizable: bool) {…}

    helgrind_barrier_resize_pre ¶

    helgrind_barrier_resize_pre :: proc "c" (bar: rawptr, new_count: uint) {…}

    helgrind_barrier_wait_pre ¶

    helgrind_barrier_wait_pre :: proc "c" (bar: rawptr) {…}

    helgrind_clean_memory ¶

    helgrind_clean_memory :: proc "c" (qzz_start: rawptr, qzz_len: uint) {…}

    helgrind_clean_memory_heap_block ¶

    helgrind_clean_memory_heap_block :: proc "c" (qzz_blockstart: rawptr) -> int {…}

    helgrind_clean_memory_slice ¶

    helgrind_clean_memory_slice :: proc "c" (qzz: []u8) {…}

    helgrind_client_request_expr ¶

    helgrind_client_request_expr :: proc "c" (
    	default:        uintptr, 
    	request:        Helgrind_Client_Request, 
    	a0, a1, a2, a3, 
    	a4:             uintptr, 
    ) -> uintptr {…}

    helgrind_client_request_stmt ¶

    helgrind_client_request_stmt :: proc "c" (
    	request:        Helgrind_Client_Request, 
    	a0, a1, a2, a3, 
    	a4:             uintptr, 
    ) {…}

    helgrind_client_request_unimp ¶

    helgrind_client_request_unimp :: proc "c" (msg: cstring) {…}

    helgrind_cond_broadcast_pre ¶

    helgrind_cond_broadcast_pre :: proc "c" (cond: rawptr) {…}

    helgrind_cond_destroy_pre ¶

    helgrind_cond_destroy_pre :: proc "c" (cond: rawptr) {…}

    helgrind_cond_init_post ¶

    helgrind_cond_init_post :: proc "c" (cond: rawptr) {…}

    helgrind_cond_signal_pre ¶

    helgrind_cond_signal_pre :: proc "c" (cond: rawptr) {…}

    helgrind_cond_wait_post ¶

    helgrind_cond_wait_post :: proc "c" (cond: rawptr, lock: rawptr) -> bool {…}

    helgrind_cond_wait_pre ¶

    helgrind_cond_wait_pre :: proc "c" (cond: rawptr, lock: rawptr) -> bool {…}

    helgrind_disable_checking ¶

    helgrind_disable_checking :: proc "c" (qzz_start: rawptr, qzz_len: uint) {…}

    helgrind_enable_checking ¶

    helgrind_enable_checking :: proc "c" (qzz_start: rawptr, qzz_len: uint) {…}

    helgrind_mutex_destroy_pre ¶

    helgrind_mutex_destroy_pre :: proc "c" (mutex: rawptr) {…}

    helgrind_mutex_init_post ¶

    helgrind_mutex_init_post :: proc "c" (mutex: rawptr, mb_rec: uint) {…}

    helgrind_mutex_lock_post ¶

    helgrind_mutex_lock_post :: proc "c" (mutex: rawptr) {…}

    helgrind_mutex_lock_pre ¶

    helgrind_mutex_lock_pre :: proc "c" (mutex: rawptr, is_try_lock: bool) {…}

    helgrind_mutex_unlock_post ¶

    helgrind_mutex_unlock_post :: proc "c" (mutex: rawptr) {…}

    helgrind_mutex_unlock_pre ¶

    helgrind_mutex_unlock_pre :: proc "c" (mutex: rawptr) {…}

    helgrind_rwlock_destroy_pre ¶

    helgrind_rwlock_destroy_pre :: proc "c" (lock: rawptr) {…}

    helgrind_rwlock_init_post ¶

    helgrind_rwlock_init_post :: proc "c" (lock: rawptr) {…}

    helgrind_rwlock_lock_pre ¶

    helgrind_rwlock_lock_pre :: proc "c" (lock: rawptr, is_w: bool) {…}

    helgrind_rwlock_unlock_post ¶

    helgrind_rwlock_unlock_post :: proc "c" (lock: rawptr, is_w: bool) {…}

    helgrind_sem_destroy_pre ¶

    helgrind_sem_destroy_pre :: proc "c" (sem: rawptr) {…}

    helgrind_sem_init_post ¶

    helgrind_sem_init_post :: proc "c" (sem: rawptr, value: uint) {…}

    helgrind_sem_post_pre ¶

    helgrind_sem_post_pre :: proc "c" (sem: rawptr) {…}

    helgrind_sem_wait_post ¶

    helgrind_sem_wait_post :: proc "c" (sem: rawptr) {…}

    inner_threads ¶

    inner_threads :: proc "c" (qzz: rawptr) {…}

    leak_check ¶

    leak_check :: proc "c" () {…}
     

    Do a full memory leak check (like --leak-check=full) mid-execution.

    make_mem_defined ¶

    make_mem_defined :: proc "c" (qzz: []u8) -> bool {…}
     

    Mark memory at raw_data(qzz) as addressable for len(qzz) bytes. Returns true when run on Valgrind and false otherwise.

    make_mem_defined_if_addressable ¶

    make_mem_defined_if_addressable :: proc "c" (qzz: []u8) -> bool {…}
     

    Similar to make_mem_defined(qzz) except that addressability is not altered: bytes which are addressable are marked as defined, but those which are not addressable are left unchanged. Returns true when run on Valgrind and false otherwise.

    make_mem_no_access ¶

    make_mem_no_access :: proc "c" (qzz: []u8) -> bool {…}
     

    Mark memory at raw_data(qzz) as unaddressable for len(qzz) bytes. Returns true when run on Valgrind and false otherwise.

    make_mem_undefined ¶

    make_mem_undefined :: proc "c" (qzz: []u8) -> bool {…}
     

    Mark memory at raw_data(qzz) as addressable but undefined for len(qzz) bytes. Returns true when run on Valgrind and false otherwise.

    malloc_like_block ¶

    malloc_like_block :: proc "c" (mem: []u8, rz_b: uintptr, is_zeroed: bool) {…}

    map_ip_to_src_loc ¶

    map_ip_to_src_loc :: proc "c" (addr: rawptr, buf64: ^[64]u8) -> uintptr {…}
     

    Map a code address to a source file name and line number. buf64 must point to a 64-byte buffer in the caller's address space. The result will be dumped in there and is guaranteed to be zero terminated. If no info is found, the first byte is set to zero.

    mem_check_client_request_expr ¶

    mem_check_client_request_expr :: proc "c" (
    	default:        uintptr, 
    	request:        Mem_Check_Client_Request, 
    	a0, a1, a2, a3, 
    	a4:             uintptr, 
    ) -> uintptr {…}

    mem_check_client_request_stmt ¶

    mem_check_client_request_stmt :: proc "c" (
    	request:        Mem_Check_Client_Request, 
    	a0, a1, a2, a3, 
    	a4:             uintptr, 
    ) {…}

    mem_pool_alloc ¶

    mem_pool_alloc :: proc "c" (pool: rawptr, mem: []u8) {…}
     

    Associate a section of memory with a memory pool.

    mem_pool_change ¶

    mem_pool_change :: proc "c" (pool: rawptr, addr_a: rawptr, mem: []u8) {…}
     

    Resize and/or move a section of memory associated with a memory pool.

    mem_pool_exists ¶

    mem_pool_exists :: proc "c" (pool: rawptr) -> bool {…}
     

    Return true if a memory pool exists

    mem_pool_free ¶

    mem_pool_free :: proc "c" (pool: rawptr, addr: rawptr) {…}
     

    Disassociate a section of memory from a memory pool.

    mem_pool_trim ¶

    mem_pool_trim :: proc "c" (pool: rawptr, mem: []u8) {…}
     

    Disassociate parts of a section of memory outside a particular range.

    monitor_command ¶

    monitor_command :: proc "c" (command: cstring) -> bool {…}

    move_mem_pool ¶

    move_mem_pool :: proc "c" (pool_a, pool_b: rawptr) {…}
     

    Resize and/or move a section of memory associated with a memory pool.

    non_simd_call0 ¶

    non_simd_call0 :: proc "c" (p: proc "c" (_: uintptr) -> uintptr) -> uintptr {…}

    non_simd_call1 ¶

    non_simd_call1 :: proc "c" (p: proc "c" (_: uintptr, _: uintptr) -> uintptr, a0: uintptr) -> uintptr {…}

    non_simd_call2 ¶

    non_simd_call2 :: proc "c" (p: proc "c" (_: uintptr, _: uintptr, _: uintptr) -> uintptr, a0, a1: uintptr) -> uintptr {…}

    non_simd_call3 ¶

    non_simd_call3 :: proc "c" (p: proc "c" (_: uintptr, _: uintptr, _: uintptr, _: uintptr) -> uintptr, a0, a1, a2: uintptr) -> uintptr {…}

    quick_leak_check ¶

    quick_leak_check :: proc "c" () {…}
     

    Do a summary memory leak check (like --leak-check=summary) mid-execution.

    resize_inplace_block ¶

    resize_inplace_block :: proc "c" (old_mem: []u8, new_size: uint, rz_b: uintptr) {…}

    running_on_valgrind ¶

    running_on_valgrind :: proc "c" () -> uint {…}
     

    Returns the number of Valgrinds this code is running under 0 - running natively 1 - running under Valgrind 2 - running under Valgrind which is running under another Valgrind

    set_vbits ¶

    set_vbits :: proc(zzvbits, zza: []u8) -> u8 {…}
     

    Set the validity data for addresses zza, copying it from the provided zzvbits array. Return values: 0 - if not running on valgrind 1 - success 2 - [previously indicated unaligned arrays; these are now allowed] 3 - if any parts of zza/zzvbits are not addressable. The metadata is not copied in cases 0, 2 or 3 so it should be impossible to segfault your system by using this call.

    stack_change ¶

    stack_change :: proc "c" (id: uint, new_stack: []u8) {…}
     

    Change the start and end address of the stack id with the new_stack slice.

    stack_deregister ¶

    stack_deregister :: proc "c" (id: uintptr) {…}
     

    Unmark a section of memory associated with a stack id as being a stack.

    stack_register ¶

    stack_register :: proc "c" (stack: []u8) -> (stack_id: uintptr) {…}
     

    Mark a section of memory as being a stack. Returns a stack id.

    start_instrumentation ¶

    start_instrumentation :: proc "c" () {…}
     

    Start full callgrind instrumentation if not already switched on. When cache simulation is done, it will flush the simulated cache; this will lead to an artificial cache warmup phase afterwards with cache misses which would not have happened in reality.

    stop_instrumentation ¶

    stop_instrumentation :: proc "c" () {…}
     

    Stop full callgrind instrumentation if not already switched off. This flushes Valgrinds translation cache, and does no additional instrumentation afterwards, which effectivly will run at the same speed as the "none" tool (ie. at minimal slowdown). Use this to bypass Callgrind aggregation for uninteresting code parts. To start Callgrind in this mode to ignore the setup phase, use the option "--instr-atstart=no".

    toggle_collect ¶

    toggle_collect :: proc "c" () {…}
     

    Toggles collection state. The collection state specifies whether the happening of events should be noted or if they are to be ignored. Events are noted by increment of counters in a cost centre.

    zero_stats ¶

    zero_stats :: proc "c" () {…}
     

    Zero cost centres

    Procedure Groups

    This section is empty.

    Source Files

    Generation Information

    Generated with odin version dev-2024-04 (vendor "odin") Windows_amd64 @ 2024-04-26 21:08:58.789300800 +0000 UTC