Re: [patch][rfa] --gprof Performance Improvement
Dave Brolley <[email protected]>
| Newsgroups | gmane.comp.emulators.sid.devel |
|---|---|
| Message-ID | <[email protected]> |
Frank Ch. Eigler wrote: >Nicely done, thanks. (If backward compatibility was at all a concern, >the gprof component could have a new "sample" pin that assumes the >pin-based PC traffic, instead of changing the current interface. But >I agree that the old interface is not worth saving.) > >Was the string conversion stuff obvious in profiling output? > > I don't know --- I took a more brute force approach, since I knew that the overhead was in the driving of the cpu's sample-gprof pin (the only effect of using --gprof). I first suspected overhead in the std::map used to collect the buckets, but that turned out to be small. I then tried the "local reference for this->stats[current_stats]" optimization and got the 3%. I then tried experimentally removing the collection of the data and found no improvement. That left the parsing of the attributes which, when experimentally removed, accounted for all of the nasty overhead. Dave