libjf API reference guide

Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

jf_trace.h File Reference

#include <jf/jf_config.h>
#include <jf/jf_defines.h>

Go to the source code of this file.

Defines

#define JF_TRACE(a)
#define JF_TRACE_HEX_DATA(a, b)
#define JF_TRACE_MASK_ENV_VAR   "JF_TRACE_MASK"
#define JF_TRACE_MOD_LIB_CACHE_FILE   0x00000001
#define JF_TRACE_MOD_LIB_CRASH_SIMUL   0x00000002
#define JF_TRACE_MOD_LIB_FILE   0x00000004
#define JF_TRACE_MOD_LIB_JOURNAL   0x00000020
#define JF_TRACE_MOD_LIB_JOURNAL_COLD_RECOVERY   0x00000040
#define JF_TRACE_MOD_LIB_JOURNAL_FILE   0x00000080
#define JF_TRACE_MOD_LIB_JOURNAL_FILE_TAB   0x00000008
#define JF_TRACE_MOD_LIB_JOURNAL_RECOVERY   0x00000100
#define JF_TRACE_MOD_LIB_PATCHES   0x00002000
#define JF_TRACE_MOD_LIB_RECIND_LIST   0x00000200
#define JF_TRACE_MOD_LIB_RECIND_POOL   0x00000400
#define JF_TRACE_MOD_LIB_RECIND_SEQ   0x00000800
#define JF_TRACE_MOD_LIB_TIMER   0x00001000
#define JF_TRACE_MOD_LIB_UTILS   0x00000010
#define JF_TRACE_MOD_PRG_TESTS   0x80000000
#define JF_TRACE_MOD_PRG_UTILS   0x40000000

Functions

int jf_trace (const char *fmt,...)
void jf_trace_hex_data (const byte_t *data, jf_word_t size, FILE *out_stream)
void jf_trace_text_data (const byte_t *data, jf_word_t size, FILE *out_stream)


Define Documentation

#define JF_TRACE  ) 
 

JF_TRACE macro is used to compile trace messages only if _DEBUG macro is defined trace message is printed only for modules (JF_TRACE_MODULE) covered by trace mask (JF_TRACE_MASK) specified as environment variable Definition at line 138 of file jf_trace.h.

Referenced by bench_00_ljf_post(), bench_00_ljf_pre(), bench_00_ljf_run(), bench_00_sio_post(), bench_00_sio_pre(), bench_00_sio_run(), bench_01_ljf_post(), bench_01_ljf_pre(), bench_01_ljf_run(), bench_01_sio_post(), bench_01_sio_pre(), bench_01_sio_run(), bench_02_ljf_post(), bench_02_ljf_pre(), bench_02_ljf_run(), bench_02_sio_post(), bench_02_sio_pre(), bench_02_sio_run(), bench_03_ljf_post(), bench_03_ljf_pre(), bench_03_ljf_run(), bench_03_sio_post(), bench_03_sio_pre(), bench_03_sio_run(), bench_table_create(), bench_table_destroy(), bench_table_unlink(), bench_test_results_compute(), bench_test_results_compute_one(), bench_X0_ljf_post(), bench_X0_ljf_pre(), bench_X0_sio_post(), bench_X0_sio_pre(), bench_X1_ljf_pre(), bench_X1_sio_pre(), jf_cache_file_chunk_prepare(), jf_cache_file_chunk_set_content(), jf_cache_file_clear(), jf_cache_file_destroy(), jf_cache_file_get_free_ranges(), jf_cache_file_get_used_ranges(), jf_cache_file_init(), jf_cache_file_merge(), jf_cache_file_resize(), jf_cache_file_search_hint(), jf_cache_file_set_content(), jf_cache_file_split(), jf_cache_file_trace(), jf_file_build_open_mode(), jf_file_check_mode(), jf_file_close(), jf_file_getc(), jf_file_gets(), jf_file_open(), jf_file_printf(), jf_file_putc(), jf_file_puts(), jf_file_read(), jf_file_reset(), jf_file_seek(), jf_file_size(), jf_file_vprintf(), jf_file_write(), jf_journal_add_byte_data(), jf_journal_analyze(), jf_journal_apply_changes(), jf_journal_attach_file(), jf_journal_close(), jf_journal_close_detach_file(), jf_journal_cold_recovery(), jf_journal_cold_recovery_analyze(), jf_journal_cold_recovery_patch(), jf_journal_cold_recovery_patch_record(), jf_journal_cold_recovery_patch_seq(), jf_journal_cold_recovery_prep_pool(), jf_journal_cold_recovery_update_lists(), jf_journal_commit_int(), jf_journal_create(), jf_journal_fetch_ctrl_code(), jf_journal_fetch_record(), jf_journal_file_get_open_mode(), jf_journal_file_init(), jf_journal_file_set_cache_file(), jf_journal_file_set_open_mode(), jf_journal_file_set_options(), jf_journal_file_set_path(), jf_journal_file_tab_add(), jf_journal_file_tab_del(), jf_journal_file_tab_dump(), jf_journal_file_tab_get_jfile(), jf_journal_file_tab_init(), jf_journal_file_tab_restore(), jf_journal_file_tab_search(), jf_journal_get_byte_data(), jf_journal_get_real_path(), jf_journal_init(), jf_journal_is_sync(), jf_journal_load(), jf_journal_new_unit_of_work(), jf_journal_open(), jf_journal_open_attach_file(), jf_journal_remove_changes(), jf_journal_reopen_files(), jf_journal_restore_files(), jf_journal_rollback_int(), jf_journal_rotate(), jf_journal_scan(), jf_journal_scan_redo(), jf_journal_scan_search(), jf_journal_scan_undo(), jf_journal_set_all_sync(), jf_journal_shift_files(), jf_journal_sync(), jf_journal_trace_record(), jf_journal_update_file_table(), jf_journal_util_join(), jf_journal_util_leave(), jf_journal_util_rename(), jf_journal_write_record(), jf_journal_write_records(), jf_recind_list_add(), jf_recind_list_destroy(), jf_recind_list_reset(), jf_recind_pool_create(), jf_recind_pool_destroy(), jf_recind_pool_reset(), jf_recind_seq_add(), jf_recind_seq_destroy(), jf_recind_seq_reset(), jf_stream_size(), jf_stream_sync(), jf_stream_truncate(), jf_timer_reset(), jf_timer_start(), jf_timer_stop(), jf_translate_CRLF_NL(), and jf_translate_NL_CRLF().

#define JF_TRACE_HEX_DATA a,
 ) 
 

JF_TRACE_HEX_DATA macro is used to compile trace messages only if _DEBUG macro is defined; trace message is printed only for modules (JF_TRACE_MODULE) covered by trace mask (JF_TRACE_MASK) specified as environment variable Definition at line 155 of file jf_trace.h.

Referenced by jf_journal_write_record(), and jf_journal_write_records().

#define JF_TRACE_MASK_ENV_VAR   "JF_TRACE_MASK"
 

Name of the environment variable must be used to set the trace mask Definition at line 40 of file jf_trace.h.

#define JF_TRACE_MOD_LIB_CACHE_FILE   0x00000001
 

trace module for library module "jf_cache_file" Definition at line 47 of file jf_trace.h.

#define JF_TRACE_MOD_LIB_CRASH_SIMUL   0x00000002
 

trace module for library module "jf_crash_simul" Definition at line 52 of file jf_trace.h.

#define JF_TRACE_MOD_LIB_FILE   0x00000004
 

trace module for library module "jf_file" Definition at line 57 of file jf_trace.h.

#define JF_TRACE_MOD_LIB_JOURNAL   0x00000020
 

trace module for library module "jf_journal" Definition at line 72 of file jf_trace.h.

#define JF_TRACE_MOD_LIB_JOURNAL_COLD_RECOVERY   0x00000040
 

trace module for library module "jf_journal_cold_recovery" Definition at line 77 of file jf_trace.h.

#define JF_TRACE_MOD_LIB_JOURNAL_FILE   0x00000080
 

trace module for library module "jf_journal_file" Definition at line 82 of file jf_trace.h.

#define JF_TRACE_MOD_LIB_JOURNAL_FILE_TAB   0x00000008
 

trace module for library module "jf_journal_file_tab" Definition at line 62 of file jf_trace.h.

#define JF_TRACE_MOD_LIB_JOURNAL_RECOVERY   0x00000100
 

trace module for library module "jf_journal_cold_recovery" Definition at line 87 of file jf_trace.h.

#define JF_TRACE_MOD_LIB_PATCHES   0x00002000
 

trace module for library patches (missing functions) Definition at line 112 of file jf_trace.h.

#define JF_TRACE_MOD_LIB_RECIND_LIST   0x00000200
 

trace module for library module "jf_recind_list" Definition at line 92 of file jf_trace.h.

#define JF_TRACE_MOD_LIB_RECIND_POOL   0x00000400
 

trace module for library module "jf_recind_pool" Definition at line 97 of file jf_trace.h.

#define JF_TRACE_MOD_LIB_RECIND_SEQ   0x00000800
 

trace module for library module "jf_recind_seq" Definition at line 102 of file jf_trace.h.

#define JF_TRACE_MOD_LIB_TIMER   0x00001000
 

trace module for library module "jf_timer" Definition at line 107 of file jf_trace.h.

#define JF_TRACE_MOD_LIB_UTILS   0x00000010
 

trace module for library module "jf_utils" Definition at line 67 of file jf_trace.h.

#define JF_TRACE_MOD_PRG_TESTS   0x80000000
 

trace module for library case tests Definition at line 122 of file jf_trace.h.

#define JF_TRACE_MOD_PRG_UTILS   0x40000000
 

trace module for library utility programs Definition at line 117 of file jf_trace.h.


Function Documentation

int jf_trace const char *  fmt,
  ...
 

Send trace record to stderr

Parameters:
fmt IN record format
... IN record data
Definition at line 35 of file jf_trace.c.

void jf_trace_hex_data const byte_t data,
jf_word_t  size,
FILE *  out_stream
 

Dump the content of a piece of memory to a stream (hex format)

Parameters:
data IN pointer to base memory
size IN number of bytes to dump
out_stream IN destination standard I/O stream
Definition at line 51 of file jf_trace.c.

References byte_t, and jf_word_t.

Referenced by jf_cache_file_trace(), and jf_journal_trace_record().

void jf_trace_text_data const byte_t data,
jf_word_t  size,
FILE *  out_stream
 

Dump the content of a piece of memory to a stream (text format)

Parameters:
data IN pointer to base memory
size IN number of bytes to dump
out_stream IN destination standard I/O stream
Definition at line 63 of file jf_trace.c.

References byte_t, and jf_word_t.

Referenced by jf_cache_file_trace(), and jf_journal_trace_record().


Copyright 2005 © Tiian