|
From: Giri P. <sha...@gm...> - 2022-04-06 03:27:05
|
Thanks a lot Will and William for your responses. My apologies for being
novice in this aspect:
1) My program looks like this. [Just to learn operf]
*#include <iostream>using namespace std;void fun1(){ for(auto i = 0; i <
1000000000; i++) { std::cout << "Fun1" << endl; }}void fun2(){
for(auto i = 0; i < 1000000000; i++) { std::cout << "Fun2" << endl;
}}int main(){ fun1(); fun2();}*
2) I ran the command : *operf -g ./a.out*
3) It ran for almost 20 minutes and then I killed the process.
4) Can you please let me know how to run opreport to : get the call graph *with
details of Functions fun1 and fun2 *with details such as *how many cycles
they consumed, how many times they're called* etc.
Regards,
Giri Prasad
On Tue, Apr 5, 2022 at 9:16 PM will schmidt <wil...@vn...>
wrote:
> On Tue, 2022-04-05 at 15:29 +0530, Giri Prasad wrote:
> >
> > 1) I installed operf in linux machine, below is the version:
> >
> > operf: oprofile 1.3.0 compiled on Feb 2 2020 20:33:34
> >
>
> > 2) I wrote a simple program and ran : operf ./a.out
> >
> > 3) it generated the folder: oprofile_data
> >
> > 4) when i run opreport as below:
> >
> > ##> opreport session:oprofile_data event:DATA_MEM_REFS
> > Using /home/prasadgi/tools/cpp/oprofile_data/samples/ for samples
> > directory.
> > opreport error: No sample found: Please specify a session containing
> > sample data.
> >
> > Please help what is missing ?
>
>
> Most likely the program did not run long enough or simply did not
> trigger any DATA_MEM_REFS events.
>
> Does opreport give you any output if
> you leave off the "event:" qualifier?
>
> Thanks
> -Will (Schmidt)
>
>
> >
> > Regards,
> > Giri Prasad
> > _______________________________________________
> > oprofile-list mailing list
> > opr...@li...
> > https://lists.sourceforge.net/lists/listinfo/oprofile-list
>
>
|