Extend utrace enum to trace BreakIterator instance and internal language break engine

Description

Suggested by Shane to use utrace to trace BreakIterator instance and internal language break engine

diff --git a/icu4c/source/common/unicode/utrace.h b/icu4c/source/common/unicode/utrace.h
index 5afcd9f449..d39682b7c8 100644
— a/icu4c/source/common/unicode/utrace.h
+++ b/icu4c/source/common/unicode/utrace.h
@@ -177,6 +177,112 @@ typedef enum UTraceFunctionNumber {
UTRACE_RES_DATA_LIMIT,
#endif // U_HIDE_INTERNAL_API

+#ifndef U_HIDE_DRAFT_API
+ /**
+ * The lowest break iterator location.
+ * @draft ICU 67
+ */
+ UTRACE_UBRK_START=0x4000,
+ /**
+ * Indicates that a character instance of break iterator was created.
+ *
+ * @draft ICU 67
+ */
+ UTRACE_UBRK_CREATE_CHARACTER = UTRACE_UBRK_START,
+
+ /**
+ * Indicates that a word instance of break iterator was created.
+ *
+ * @draft ICU 67
+ */
+ UTRACE_UBRK_CREATE_WORD,
+
+ /**
+ * Indicates that a line instance of break iterator was created.
+ *
+ * @draft ICU 67
+ */
+ UTRACE_UBRK_CREATE_LINE,
+
+ /**
+ * Indicates that a line (style loose) instance of break iterator was created.
+ *
+ * @draft ICU 67
+ */
+ UTRACE_UBRK_CREATE_LINE_LOOSE,
+
+ /**
+ * Indicates that a line (style normal) instance of break iterator was created.
+ *
+ * @draft ICU 67
+ */
+ UTRACE_UBRK_CREATE_LINE_NORMAL,
+
+ /**
+ * Indicates that a line (style strict) instance of break iterator was created.
+ *
+ * @draft ICU 67
+ */
+ UTRACE_UBRK_CREATE_LINE_STRICT,
+
+ /**
+ * Indicates that a sentence instance of break iterator was created.
+ *
+ * @draft ICU 67
+ */
+ UTRACE_UBRK_CREATE_SENTENCE,
+
+ /**
+ * Indicates that a title instance of break iterator was created.
+ *
+ * @draft ICU 67
+ */
+ UTRACE_UBRK_CREATE_TITLE,
+
+ /**
+ * Indicates that an internal Thai break engine was created.
+ *
+ * @draft ICU 67
+ */
+ UTRACE_UBRK_CREATE_THAI_BREAK_ENGINE,
+
+ /**
+ * Indicates that an internal Lao break engine was created.
+ *
+ * @draft ICU 67
+ */
+ UTRACE_UBRK_CREATE_LAO_BREAK_ENGINE,
+
+ /**
+ * Indicates that an internal Burmese break engine was created.
+ *
+ * @draft ICU 67
+ */
+ UTRACE_UBRK_CREATE_BURMESE_BREAK_ENGINE,
+
+ /**
+ * Indicates that an internal Khmer break engine was created.
+ *
+ * @draft ICU 67
+ */
+ UTRACE_UBRK_CREATE_KHMER_BREAK_ENGINE,
+
+ /**
+ * Indicates that an internal Chinese/Japanese break engine was created.
+ *
+ * @draft ICU 67
+ */
+ UTRACE_UBRK_CREATE_CHINESE_JAPANESE_BREAK_ENGINE,
+
+ /**
+ * Indicates that an internal Korean break engine was created.
+ *
+ * @draft ICU 67
+ */
+ UTRACE_UBRK_CREATE_KOREAN_BREAK_ENGINE,
+
+#endif // U_HIDE_DRAFT_API
+
} UTraceFunctionNumber;

Activity

Show:
Frank Yung-Fong Tang
March 5, 2020, 1:50 AM

Frank Yung-Fong Tang
March 4, 2020, 9:10 PM

Mark it as Accept TC-Approve since we talk about the API proposal in the ICU-TC and got approved.

Fixed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Frank Yung-Fong Tang

Reporter

Frank Yung-Fong Tang

Components

Labels

Priority

minor

Time Needed

Days

Fix versions