Platform-specific package target: windows_amd64

Collection Info

View Source
Collection
core
Path
sys/valgrind
Entries
99

Source Files

Types

7

Procedures

92

added_leak_check #

Source
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.

changed_leak_check #

Source
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 #

Source
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 #

Source
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.

count_errrors #

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

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

create_block #

Source
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.

disable_addr_error_reporting_in_range #

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

Disable reporting of addressing errors in the specified address range.

disable_error_reporting #

Source
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 #

Source
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 #

Source
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 #

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

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

dump_stats_at #

Source
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 #

Source
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 #

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

Re-enable error reporting

get_vbits #

Source
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_signal #

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

helgrind_annotate_condvar_signal_all #

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

helgrind_annotate_condvar_wait #

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

helgrind_clean_memory_heap_block #

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

helgrind_clean_memory_slice #

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

leak_check #

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

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

make_mem_defined #

Source
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 #

Source
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 #

Source
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 #

Source
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.

map_ip_to_src_loc #

Source
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_pool_alloc #

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

Associate a section of memory with a memory pool.

mem_pool_change #

Source
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_free #

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

Disassociate a section of memory from a memory pool.

mem_pool_trim #

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

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

move_mem_pool #

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

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

quick_leak_check #

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

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

running_on_valgrind #

Source
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 #

Source
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 #

Source
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 #

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

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

stack_register #

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

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

start_instrumentation #

Source
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 #

Source
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 #

Source
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 #

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

Zero cost centres