Re: opcontrol sh: write error: Invalid argument

William Cohen <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
On 01/28/2015 03:35 AM, Andrew Jones wrote:
>> Hi,
>>
>> Thanks for the output. The output above looks to match up with opcontrol do_param_setup():
>>
>> if test "$KERNEL_SUPPORT" = "yes" -a -f $MOUNT/backtrace_depth; then
>> set_param backtrace_depth $CALLGRAPH
>>
>> However, the "test yes = yes" doesn't match up with the verion I have. Which specific versions of the kernel and oprofile are you using. Do you have pointers to the specific sources for those?
>>
>> -Will

Hi Andrew,

What version of the kernel is being used on the target? Is it a new enough kernel to have perf support and allow the use of "operf -a" rather than opcontrol?
Using operf instead might avoid some of these issues with opcontrol.

> 
> Hi Will,
> 
> Sorry to double post.  I have a couple of bytes of extra info:
> 
> 1.  Regarding the "_sh: write error: Invalid Argument_" message:
> Jian Peng, in this post, appears to be having this exact same symptom:
> http://permalink.gmane.org/gmane.linux.oprofile/9406
> 
> Later on in that same thread, Maynard said that:
> "/OProfile should "work" in spite of the non-support of callgraph in the kernel./"
> 
> Question: Can I ignore that "Invalid argument" error?

Thanks for the pointer to the earlier email. Based on that it would be okay to comment out the write to /dev/oprofile/backtrace_depth.  However, if you have ability to rebuild the kernel the following patch to the kernel might be a better approach:

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/mips/oprofile?id=1b48142a809ee03f48979fad647245dbe0ce423a

> 
> 
> 2. Regarding the "_Failed to exec opjitconv: No such file or directory_" message:
> In my daemon/init.c, opjitconv_path is equal to:
> /home/andrew/ex7/output/apps/oprofile_all/usr/bin//opjitconv  at runtime.
> 
> I guess this is derived from my --prefix.  If I ignore this error, I am still able to successfully do profiling anyway.  So is it safe to ignore this error too?
> 

The opjitconv is only needed for java code to map samples back to methods.  If you are not running java code then it will be safe to ignore that.  I know that space is premium, so maybe have a dummy opjitconv to quiet that error.

-Will
> 
> Thanks so much for your help!!!
> Regards,
> Andrew
> 


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.