xml_utils.h

Go to the documentation of this file.
00001 
00011 #ifndef XML_UTILS_H
00012 #define XML_UTILS_H
00013 
00014 #include "symbol.h"
00015 #include "format_output.h"
00016 #include "xml_output.h"
00017 
00018 typedef symbol_collection::const_iterator sym_iterator;
00019 extern bool want_xml;
00020 
00021 class extra_images;
00022 class op_bfd;
00023 
00024 class xml_utils {
00025 public:
00026     xml_utils(format_output::xml_formatter * xo,
00027         symbol_collection const & s, size_t nc,
00028         extra_images const & extra);
00029     // these members are static because they are invoked before
00030     // the xml_utils object has been created
00031     static std::string get_timer_setup(size_t count);
00032     static std::string get_event_setup(std::string event, size_t count,
00033                        std::string unit_mask);
00034     static std::string get_profile_header(std::string cpu_name,
00035                                           double const speed);
00036     static void set_nr_cpus(size_t cpus);
00037     static void set_nr_events(size_t events);
00038     static void set_has_nonzero_masks();
00039     static void add_option(tag_t tag, bool value);
00040     static void add_option(tag_t tag, std::string const & value);
00041     static void add_option(tag_t tag, std::vector<std::string> const & value);
00042     static void add_option(tag_t tag, std::list<std::string> const & value);
00043 
00044     static void output_xml_header(std::string const & command_options,
00045                            std::string const & cpu_info,
00046                            std::string const & events);
00047     void output_symbol_bytes(std::ostream & out, symbol_entry const * symb,
00048                              size_t sym_id, op_bfd const & abfd);
00049     bool output_summary_data(std::ostream & out, count_array_t const & summary,
00050                              size_t pclass);
00051     size_t get_symbol_index(sym_iterator const it);
00052     void output_program_structure(std::ostream & out);
00053     void build_subclasses(std::ostream & out);
00054 private:
00055     bool multiple_events;
00056     bool has_subclasses;
00057     size_t bytes_index;
00058     extra_images const & extra_found_images;
00059     static bool has_nonzero_masks;
00060     static size_t events_index;
00061 };
00062 
00063 extern xml_utils * xml_support;
00064 
00065 #endif /* !XML_UTILS_H */

Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1