Re: [iovisor-dev] bcc tools profile.py: open procmap fails

2017-08-17 Thread Fenggang Wu via iovisor-dev
Hi Teng and Y, Yes, you're right. Previously my script (test_profile.sh) is to run both the binary (./spin) and profile.py in the background and to kill profile.py immediately the binary exits. Profile.py does not resolve the symbols until it receives the kill signal. However, when it receives th

Re: [iovisor-dev] bcc tools profile.py: open procmap fails

2017-08-16 Thread Teng Qin via iovisor-dev
Also the binary need to be still running when doing symbolization. On Wed, Aug 16, 2017 at 3:14 PM, Y Song via iovisor-dev < iovisor-dev@lists.iovisor.org> wrote: > > > > // always fails, with errno = 2 > > procmap = fopen(procmap_filename, "r"); > > > > errno 2 (ENOENT) means file does not exis

Re: [iovisor-dev] bcc tools profile.py: open procmap fails

2017-08-16 Thread Y Song via iovisor-dev
> > // always fails, with errno = 2 > procmap = fopen(procmap_filename, "r"); > errno 2 (ENOENT) means file does not exist. You can add additional print to check whether the file truly exists or not. On Sat, Aug 12, 2017 at 5:14 AM, Fenggang Wu via iovisor-dev wrote: > Hi there, > > I am trying

Re: [iovisor-dev] bcc tools profile.py: open procmap fails

2017-08-12 Thread Fenggang Wu via iovisor-dev
Hi Wenxian, I've tried -g, -ggdb, -gdwarf, -no-omit-frame-pointer (per the DEBUGGING section of the profile(8) man page.) to compile spin respectively, as well as a various combination of them. But still no luck. Thanks! -Fenggang Fenggang WU (吴凤刚) Ph.D. Student Department of Computer Science an

Re: [iovisor-dev] bcc tools profile.py: open procmap fails

2017-08-12 Thread wenxian li via iovisor-dev
Have you tried to compile spin.cc with -g para? Thanks, Wenxian On Sat, Aug 12, 2017 at 8:14 PM, Fenggang Wu via iovisor-dev < iovisor-dev@lists.iovisor.org> wrote: > Hi there, > > I am trying out bcc tools from http://github.com/iovisor/bcc, more > specificaly profile.py and offcputime.py. How