Hi Raul, gem5.perf and gem5.prof are targets used to profile gem5, not what is running as a guest in gem5. gem5.perf is using google perftools, and gem5.prof is using gprof. Thus, if you are optimising gem5 itself these build targets are very helpful. Note that the stats.txt has nothing to do with profiling gem5 itself, and you get exactly the same stats with gem5.fast, gem5.debug etc.
gem5 ARM full-system lets you run a ‘normal’ profiler in the simulated guest OS. I do not dare say for the other ISAs. Andreas On 12/02/2015 22:34, "Raul Garcia via gem5-dev" <[email protected]> wrote: >Hello Steve, > >Thank you for your reply :). I am a new user of gem5 and so far I know >that running gem5.prof enables the stats.txt to report a number of >metrics like number of ops simulated, etc Now I have some questions: > >1. I want to know the the percentage of the total running time that >program used by a particular function, like gprof tool would report e. g.: > >Each sample counts as 0.01 seconds. >% cumulative self self total >time seconds seconds calls s/call s/call name >33.86 15.52 15.52 1 15.52 15.52 func2 >33.82 31.02 15.50 1 15.50 15.50 new_func1 >33.29 46.27 15.26 1 15.26 30.75 func1 >0.07 46.30 0.03 main > >Does the stats.txt file report this metrics? > >2. If I take the gmon.out file that was generated before and the binary >and I execute the gprof command: > >$ arm-linux-gnueabi-gprof hello gmon.out >arm-linux-gnueabi-gprof: gmon.out: unexpected EOF after reading 4196091 >of 25458728 samples > >I get an error, am I doing it wrong?. How can I read the generated >gmon.out file using gprof and the binary? > >3. The stats.txt reports the number of committed ops, but how can I know >the opcodes of all of those ops that were committed? I know that the >number of instruction of each class is reported but how can I dump the >exact number that each instruction in particular was executed? > > >Best Regards, >Raul. >________________________________________ >From: gem5-dev [[email protected]] on behalf of Steve Reinhardt >via gem5-dev [[email protected]] >Sent: Thursday, February 12, 2015 8:37 PM >To: gem5 Developer List >Subject: Re: [gem5-dev] Using gprof in SE mode > >Are you looking to run gprof specifically, or are you just wanting profile >information? As was discussed in this earlier thread, those are very >different things, and only the latter one is really practical. > >I don't know that anyone has followed up on the ideas discussed on that >earlier thread (I hope anyone who has speaks up), but if you need help on >some of the things that were mentioned (using the BaseCPU profile or >function_trace features) please ask away. > >Steve > > >On Thu, Feb 12, 2015 at 10:32 AM, Raul Garcia via gem5-dev < >[email protected]> wrote: > >> Hello All, >> >> I know that this thread is a little old, but I am interested in using >> gprof for applications profiling in Syscall emulation mode. So my >>question >> is, is this feasible to do? Would it work in FS mode or should I look >>for a >> different alternative? >> >> Cheers, >> Raul. >> _______________________________________________ >> gem5-dev mailing list >> [email protected] >> http://m5sim.org/mailman/listinfo/gem5-dev >> >_______________________________________________ >gem5-dev mailing list >[email protected] >http://m5sim.org/mailman/listinfo/gem5-dev >_______________________________________________ >gem5-dev mailing list >[email protected] >http://m5sim.org/mailman/listinfo/gem5-dev > -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590 ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782 _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
