49 lines
1.7 KiB
Diff
49 lines
1.7 KiB
Diff
|
|
diff --git a/source/common/restrace.cpp b/source/common/restrace.cpp
|
||
|
|
index 1f83372d..e32ce5ad 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 {
|
||
|
|
@@ -115,6 +119,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;
|
||
|
|
|
||
|
|
@@ -126,6 +131,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
|