From: Donak, J. <jd...@ci...> - 2008-07-08 14:26:10
|
The problem is related to the linux box I am using as the nfs server. If I use a different nfs server running bsd, there is no problem. JD -----Original Message----- From: Donak, John Sent: Friday, July 04, 2008 11:31 AM To: 'Maynard Johnson'; 'opr...@li...' Subject: RE: [PATCH] Fix for cross-compile error of oprofile 0.9.4 RC I have narrowed done the nfs problem. When storing the sample files on an nfs mount, ftruncate in odb_open fails with an errno of "invalid argument". This leads to successive failures such that the file is left as is. Since I assume ftruncate is meant to initialize the sample file to a certain size with all 0s, this at least appears to work. At this time, I am not sure if this is a permission problem or an nfs bug/feature. Since the sample files ARE getting created, I don't think it is the former. Any ideas? JD -----Original Message----- From: Donak, John Sent: Thursday, July 03, 2008 11:33 AM To: 'Richard Purdie' Cc: Maynard Johnson; opr...@li... Subject: RE: [PATCH] Fix for cross-compile error of oprofile 0.9.4 RC My initial scenario is that I am running opreport on the target - but setting session-dir to a location on my nfs mount (where the samples are stored). The reason for the error below is that some of the sample files are filled with 0s - hence the bad magic! This seems to be random as to which point the failure occurs. i.e. sometimes it is the TIMER.0.0.0.0.0 file, sometimes it is later on in the sequence (sample files Ok up until a point, and then all subsequent files are 0s). I do NOT see this problem if the samples are stored on the target. Since nfs is supposed to be transparent, I am confused. Something to do with the daemon? My second scenario is where the samples are stored on the nfs mount, but opreport is run on the host. This is my main goal. This has the same problem as above. My third scenario is that the samples are stored on the target and moved to the host, which then runs opreport. Using the conversion script below, this works! Thanks, Richard. Unfortunately, my target does not have lots of memory - hence the need for scenario two to work. JD -----Original Message----- From: Richard Purdie [mailto:rp...@rp...] Sent: Thursday, July 03, 2008 9:27 AM To: Donak, John Cc: Maynard Johnson; opr...@li... Subject: RE: [PATCH] Fix for cross-compile error of oprofile 0.9.4 RC On Thu, 2008-07-03 at 09:00 -0400, Donak, John wrote: > Yes, I have. Thanks. > > I am able to run oprofile RC2 on my target, but still have a problem > with using opreport on samples stored on an nfs mount (since local > storage on my embedded system is limited). > > opreport error: Invalid sample file, bad magic > number:/oprofile/samples/current/{kern}/no-vmlinux/{dep}/{kern}/no-vmlin > ux/TIMER.0.0.0.0.0 > > I am investigating... You may need to convert the sample files using opimport. OprofileUI uses the the script at http://svn.o-hand.com/view/oprofileui/trunk/scripts/oparchconv?rev=159&v iew=markup to do this. Regards, Richard |