diff --git a/src/libpmem/libpmem.link.in b/src/libpmem/libpmem.link.in index 16673da952a..7dea4b1a6b8 100644 --- a/src/libpmem/libpmem.link.in +++ b/src/libpmem/libpmem.link.in @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2019, Intel Corporation +# Copyright 2014-2024, Intel Corporation # # # src/libpmem.link -- linker link file for libpmem @@ -20,6 +20,9 @@ LIBPMEM_1.0 { pmem_has_hw_drain; pmem_check_version; pmem_errormsg; + pmem_log_get_threshold; + pmem_log_set_function; + pmem_log_set_threshold; pmem_memmove_persist; pmem_memcpy_persist; pmem_memset_persist; diff --git a/src/libpmemobj/libpmemobj.link.in b/src/libpmemobj/libpmemobj.link.in index 0bb0aea2e02..da9db4b9d57 100644 --- a/src/libpmemobj/libpmemobj.link.in +++ b/src/libpmemobj/libpmemobj.link.in @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014-2020, Intel Corporation +# Copyright 2014-2024, Intel Corporation # # # src/libpmemobj.link -- linker link file for libpmemobj diff --git a/src/test/scope/out2.log.match b/src/test/scope/out2.log.match index 50225a08d30..20e7dda9247 100644 --- a/src/test/scope/out2.log.match +++ b/src/test/scope/out2.log.match @@ -10,6 +10,9 @@ pmem_has_auto_flush$(nW) pmem_has_hw_drain$(nW) $(OPT)pmem_inject_fault_at$(nW) pmem_is_pmem$(nW) +pmem_log_get_threshold$(nW) +pmem_log_set_function$(nW) +pmem_log_set_threshold$(nW) pmem_map_file$(nW) pmem_memcpy$(nW) pmem_memcpy_nodrain$(nW) diff --git a/utils/call_stacks_analysis/make_extra.py b/utils/call_stacks_analysis/make_extra.py index d6352201716..c1bc42be3d7 100755 --- a/utils/call_stacks_analysis/make_extra.py +++ b/utils/call_stacks_analysis/make_extra.py @@ -22,12 +22,10 @@ def dict_extend(dict_, key, values): def inlines(calls: Calls) -> Calls: # common calls['core_init'] = ['util_init', 'core_log_init', 'out_init'] - calls['core_fini'] = ['out_fini', 'core_log_fini'] + calls['core_fini'] = ['out_fini', 'core_log_fini', 'last_error_msg_fini'] calls['common_init'] = ['core_init', 'util_mmap_init'] calls['common_fini'] = ['util_mmap_fini', 'core_fini'] - calls['Last_errormsg_key_alloc'] = ['_Last_errormsg_key_alloc'] - calls['_Last_errormsg_key_alloc'] = ['os_once', 'os_tls_key_create'] - calls['core_log_va'] = ['core_log_default_function'] + calls['core_log_init'] = ['core_log_default_init', 'core_log_set_function'] # libpmem calls['flush_empty'] = ['flush_empty_nolog'] @@ -41,6 +39,10 @@ def inlines(calls: Calls) -> Calls: return calls +def core_function_pointers(calls: Calls) -> Calls: + calls['core_log_va'] = ['core_log_default_function'] + return calls + def pmem_function_pointers(calls: Calls) -> Calls: calls['pmem_drain'] = ['fence_empty', 'memory_barrier'] @@ -422,13 +424,17 @@ def get_callees(calls): callees.extend(v) return list(set(callees)) +# XXX +# The way how inlines() function is used shall be changed according to: +# https://github.com/pmem/pmdk/issues/6070 def main(): - extra_calls = inlines({}) + extra_calls = core_function_pointers({}) extra_calls = pmem_function_pointers(extra_calls) extra_calls = pmemobj_function_pointers(extra_calls) with open("extra_calls.json", "w") as outfile: json.dump(extra_calls, outfile, indent = 4) + extra_calls = inlines(extra_calls) # All functions accessed via function pointers have to be provided # on top of regular API calls for cflow to process their call stacks. extra_entry_points = get_callees(extra_calls)