1 /** 2 * @file op_xml_out.h 3 * utility routines for writing XML 4 * 5 * @remark Copyright 2008 OProfile authors 6 * @remark Read the file COPYING 7 * 8 * @author Dave Nomura 9 */ 10 11 #ifndef OP_XML_OUT_H 12 #define OP_XML_OUT_H 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 typedef enum { 19 NONE=0, TABLE_ID, PROFILE, 20 PROCESSOR, CPU_NAME, TITLE, SCHEMA_VERSION, MHZ, 21 SETUP, 22 TIMER_SETUP, RTC_INTERRUPTS, 23 EVENT_SETUP, EVENT_NAME, UNIT_MASK, SETUP_COUNT, SEPARATED_CPUS, 24 OPTIONS, SESSION, DEBUG_INFO, DETAILS, EXCLUDE_DEPENDENT, EXCLUDE_SYMBOLS, 25 IMAGE_PATH, INCLUDE_SYMBOLS, MERGE, 26 CLASSES, 27 CLASS, 28 CPU_NUM, 29 EVENT_NUM, 30 EVENT_MASK, 31 PROCESS, PROC_ID, 32 THREAD, THREAD_ID, 33 BINARY, 34 MODULE, NAME, 35 CALLERS, CALLEES, 36 SYMBOL, ID_REF, SELFREF, DETAIL_LO, DETAIL_HI, 37 SYMBOL_TABLE, 38 SYMBOL_DATA, STARTING_ADDR, 39 SOURCE_FILE, SOURCE_LINE, CODE_LENGTH, 40 SUMMARY, SAMPLE, 41 COUNT, 42 DETAIL_TABLE, SYMBOL_DETAILS, DETAIL_DATA, VMA, 43 BYTES_TABLE, BYTES, 44 HELP_EVENTS, 45 HELP_HEADER, 46 HELP_TITLE, 47 HELP_DOC, 48 HELP_EVENT, 49 HELP_EVENT_NAME, 50 HELP_EVENT_GROUP, 51 HELP_EVENT_DESC, 52 HELP_COUNTER_MASK, 53 HELP_MIN_COUNT, 54 HELP_EXT, 55 HELP_UNIT_MASKS, 56 HELP_DEFAULT_MASK, 57 HELP_UNIT_MASKS_CATEGORY, 58 HELP_UNIT_MASK, 59 HELP_UNIT_MASK_VALUE, 60 HELP_UNIT_MASK_DESC 61 } tag_t; 62 63 char const * xml_tag_name(tag_t tag); 64 void open_xml_element(tag_t tag, int with_attrs, char *buffer, size_t size); 65 void close_xml_element(tag_t tag, int has_nested, char *buffer, size_t size); 66 void init_xml_int_attr(tag_t attr, int value, char *buffer, size_t size); 67 void init_xml_dbl_attr(tag_t attr, double value, char *buffer, size_t size); 68 void init_xml_str_attr(tag_t attr, char const *str, char *buffer, size_t size); 69 70 #ifdef __cplusplus 71 } 72 #endif 73 74 #endif /* OP_XML_OUT_H */ 75