Re: opcontrol sh: write error: Invalid argument
William Cohen <[email protected]>
| Newsgroups | gmane.linux.oprofile |
|---|---|
| Message-ID | <[email protected]> |
On 02/09/2015 04:31 AM, Andrew Jones wrote: >> 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, > > I'm running Linux 2.6.27.18. I don't see 'operf' in the outputted binaries from oprofile-0.9.9. Hi Andrew, I think that 2.6.27.18 kernel is probably too old to have the kernel perf support. OProfile 0.9.9 should have the source code for operf, but it isn't building because the configure doesn't find the needed kernel support. Looks like with this kernel the oprofile driver and opcontrol are the only way to go. This also means that this machine will need to stick with oprofile-0.9.9 because oprofile-1.0 removes opcontrol. I am curious how resource constrained is this MIPS system (MHz, RAM, FLASH)? > >> 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 > > Before I saw your e-mail, I found a patch from Gergely Kis for MIPS oprofile callgraph support: > http://sourceforge.net/p/oprofile/mailman/message/27581939/ > > I was able to patch my kernel successfully with this, without any errors; and now I have callgraph support! The "Invalid argument" message is gone 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. > > I'm happy to ignore the message, if it is harmless. I'm only profiling C code. > >> >> -Will > > Thanks so much for all your help! > > Andrew Glad to hear that everything is working. -Will ------------------------------------------------------------------------------ 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/