blob: 469e57212335411bfbe95f072845062bb35cd74c [file] [log] [blame]
diff --git a/source/common/restrace.cpp b/source/common/restrace.cpp
index 5c649885..03915744 100644
--- a/source/common/restrace.cpp
+++ b/source/common/restrace.cpp
@@ -18,6 +18,7 @@ U_NAMESPACE_BEGIN
ResourceTracer::~ResourceTracer() = default;
void ResourceTracer::trace(const char* resType) const {
+#if U_ENABLE_RESOURCE_TRACING
U_ASSERT(fResB || fParent);
UTRACE_ENTRY(UTRACE_UDATA_RESOURCE);
UErrorCode status = U_ZERO_ERROR;
@@ -40,9 +41,11 @@ void ResourceTracer::trace(const char* resType) const {
filePath.data(),
resPath.data());
UTRACE_EXIT_STATUS(status);
+#endif // U_ENABLE_RESOURCE_TRACING
}
void ResourceTracer::traceOpen() const {
+#if U_ENABLE_RESOURCE_TRACING
U_ASSERT(fResB);
UTRACE_ENTRY(UTRACE_UDATA_BUNDLE);
UErrorCode status = U_ZERO_ERROR;
@@ -50,6 +53,7 @@ void ResourceTracer::traceOpen() const {
CharString filePath;
UTRACE_DATA1(UTRACE_VERBOSE, "%s", getFilePath(filePath, status).data());
UTRACE_EXIT_STATUS(status);
+#endif // U_ENABLE_RESOURCE_TRACING
}
CharString& ResourceTracer::getFilePath(CharString& output, UErrorCode& status) const {
@@ -112,6 +116,7 @@ void FileTracer::traceOpenDataFile(const char* path, const char* type, const cha
}
void FileTracer::traceOpenResFile(const char* path, const char* name) {
+#if U_ENABLE_RESOURCE_TRACING
UTRACE_ENTRY(UTRACE_UDATA_RES_FILE);
UErrorCode status = U_ZERO_ERROR;
@@ -123,6 +128,7 @@ void FileTracer::traceOpenResFile(const char* path, const char* name) {
UTRACE_DATA1(UTRACE_VERBOSE, "%s", filePath.data());
UTRACE_EXIT_STATUS(status);
+#endif // U_ENABLE_RESOURCE_TRACING
}
U_NAMESPACE_END