• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_UNIT_MASKS,
55 	HELP_DEFAULT_MASK,
56 	HELP_UNIT_MASK,
57 	HELP_UNIT_MASK_VALUE,
58 	HELP_UNIT_MASK_DESC
59 	} tag_t;
60 
61 char const * xml_tag_name(tag_t tag);
62 void open_xml_element(tag_t tag, int with_attrs, char * result);
63 void close_xml_element(tag_t tag, int has_nested, char * result);
64 void init_xml_int_attr(tag_t attr, int value, char * result);
65 void init_xml_dbl_attr(tag_t attr, double value, char * result);
66 void init_xml_str_attr(tag_t attr, char const * str, char * result);
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 #endif /* OP_XML_OUT_H */
73