Fellow Monks,

I have a simple program which parses an XML file and does "stuff". I use it on different OSes.

I have read the profiling tutorial here: Profiling your code.

I'm having a problem understanding why some of the output under Name differs between OSes, i.e. the functions differ. I would have thought they would be the same. I'm confident that someone here can explain the error in my thought process. ;-)

Take the following... (I've cut it to show only the relevant part..)

On AIX
Total Elapsed Time = 1.292316 Seconds User+System Time = 0.282316 Seconds Name XML::SAX::PurePerl::Reader::URI::new XML::SAX::PurePerl::BEGIN main::BEGIN XML::Simple::find_xml_file main::ParseFile XML::SAX::PurePerl::Productions::BEGIN strict::bits Encode::BEGIN XML::SAX::ParserFactory::BEGIN XML::SAX::PurePerl::Reader::URI::BEGIN File::Temp::BEGIN XML::Simple::start_element XML::Simple::XMLin XML::SAX::PurePerl::Name XML::SAX::PurePerl::CharData
Just looking at the XML function calls produces this list:
XML::SAX::PurePerl::Reader::URI::new XML::SAX::PurePerl::BEGIN XML::Simple::find_xml_file XML::SAX::PurePerl::Productions::BEGIN XML::SAX::ParserFactory::BEGIN XML::SAX::PurePerl::Reader::URI::BEGIN XML::Simple::start_element XML::Simple::XMLin XML::SAX::PurePerl::Name XML::SAX::PurePerl::CharData
This is what I don't understand... why are there some function calls being performed on some OSes but not on others? Or are some irrelevant enough that they are simply not being listed?

on Linux_x86_64
XML::SAX::PurePerl::BEGIN XML::SAX::Base::get_feature XML::SAX::ParserFactory::_parser_class XML::SAX::BEGIN XML::SAX::ParserFactory::BEGIN XML::SAX::PurePerl::Reader::BEGIN XML::SAX::PurePerl::Reader::URI::BEGIN XML::SAX::PurePerl::doctypedecl


on Solaris 10
XML::SAX::PurePerl::BEGIN XML::SAX::PurePerl::skip_whitespace XML::SAX::PurePerl::Reader::data XML::Simple::start_element XML::SAX::PurePerl::Reader::Stream::move_along XML::SAX::PurePerl::element XML::SAX::PurePerl::Productions::BEGIN XML::Simple::BEGIN XML::SAX::ParserFactory::BEGIN XML::SAX::PurePerl::Reader::BEGIN XML::SAX::PurePerl::Reader::URI::BEGIN
I would have thought the output of DProf on the XML::Simple module would be identical on each OS. Why is this not so?

Can someone enlighten me please?

regexes

In reply to DProf output of named functions. by regexes

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.