From 2d9150c1391e3de92352743c4afe19736a0e3604 Mon Sep 17 00:00:00 2001 From: Abhinav Anil Sharma Date: Thu, 19 Oct 2023 15:22:16 -0400 Subject: [PATCH] Fix build issue. --- clients/drcachesim/tracer/drmemtrace.h | 18 ++++++++++-------- clients/drcachesim/tracer/tracer.cpp | 14 ++++++++------ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/clients/drcachesim/tracer/drmemtrace.h b/clients/drcachesim/tracer/drmemtrace.h index cb10598914d..92552a06eb7 100644 --- a/clients/drcachesim/tracer/drmemtrace.h +++ b/clients/drcachesim/tracer/drmemtrace.h @@ -277,6 +277,15 @@ DR_EXPORT drmemtrace_status_t drmemtrace_replace_file_ops_ex(drmemtrace_replace_file_ops_t *ops); +DR_EXPORT +/** + * Retrieves the full path to the output directory in -offline mode + * where data is being written. + */ +drmemtrace_status_t +drmemtrace_get_output_path(OUT const char **path); + +#ifdef BUILD_PT_TRACER DR_EXPORT /** * Retrieves the full path to the kcore file in -offline mode when kernel system @@ -293,14 +302,6 @@ DR_EXPORT drmemtrace_status_t drmemtrace_get_kallsyms_path(OUT const char **path); -DR_EXPORT -/** - * Retrieves the full path to the output directory in -offline mode - * where data is being written. - */ -drmemtrace_status_t -drmemtrace_get_output_path(OUT const char **path); - DR_EXPORT /** * Retrieves the full path to the output directory in -offline mode @@ -309,6 +310,7 @@ DR_EXPORT */ drmemtrace_status_t drmemtrace_get_kernel_pt_output_path(OUT const char **path); +#endif DR_EXPORT /** diff --git a/clients/drcachesim/tracer/tracer.cpp b/clients/drcachesim/tracer/tracer.cpp index f11e98c358b..11209091be6 100644 --- a/clients/drcachesim/tracer/tracer.cpp +++ b/clients/drcachesim/tracer/tracer.cpp @@ -2172,29 +2172,30 @@ drmemtrace_buffer_handoff(drmemtrace_handoff_func_t handoff_func, } drmemtrace_status_t -drmemtrace_get_kcore_path(OUT const char **path) +drmemtrace_get_output_path(OUT const char **path) { if (path == NULL) return DRMEMTRACE_ERROR_INVALID_PARAMETER; - *path = kcore_path; + *path = logsubdir; return DRMEMTRACE_SUCCESS; } +#ifdef BUILD_PT_TRACER drmemtrace_status_t -drmemtrace_get_kallsyms_path(OUT const char **path) +drmemtrace_get_kcore_path(OUT const char **path) { if (path == NULL) return DRMEMTRACE_ERROR_INVALID_PARAMETER; - *path = kallsyms_path; + *path = kcore_path; return DRMEMTRACE_SUCCESS; } drmemtrace_status_t -drmemtrace_get_output_path(OUT const char **path) +drmemtrace_get_kallsyms_path(OUT const char **path) { if (path == NULL) return DRMEMTRACE_ERROR_INVALID_PARAMETER; - *path = logsubdir; + *path = kallsyms_path; return DRMEMTRACE_SUCCESS; } @@ -2206,6 +2207,7 @@ drmemtrace_get_kernel_pt_output_path(OUT const char **path) *path = kernel_pt_logsubdir; return DRMEMTRACE_SUCCESS; } +#endif drmemtrace_status_t drmemtrace_get_modlist_path(OUT const char **path)