From: Maynard J. <may...@us...> - 2009-12-09 18:17:24
|
Vitali Lovich wrote: > This is oprofile 0.9.6 specific. Perhaps this is a new incompatibility introduced? That particular line has been in opcontrol since oprofile 0.9.3 (Jul 2007). Unless I hear from other busybox users that this is a common problem, I suggest you patch your distro's oprofile rpm to workaround this problem. -Maynard > > On Dec 9, 2009, at 7:04 AM, Maynard Johnson wrote: > >> Vitali Lovich wrote: >>> We are the distro vendor :P. This isn't actually a distro bug so much as busybox not being POSIX compliant. On embedded systems, busybox is quite likely to be used instead of POSIX utils, so I think it might make sense to perhaps allow it at least as an autoconf option (e.g. --enable-busybox or --enable-nonposix). >> But you are certainly not the first to use oprofile on an embedded system with busybox. Why is this affecting just you? >> >> *Richard*, as our resident embedded expert, have you had any experience using oprofile with busybox? >> >> -Maynard >>> Thoughts? >>> >>> Thanks, >>> Vitali >>> >>> On Dec 8, 2009, at 3:00 PM, Maynard Johnson wrote: >>> >>>> Vitali Lovich wrote: >>>>> Hi. Opcontrol fails to run with busybox due to the -m option not being available. I can't see any problem using -c in this case. >>>> Your distro's version of wc does not support the -m option? Then it's not posix-compliant. Write a bug against it. We don't ordinarily accept patches to workaround distro bugs. >>>> >>>> -Maynard >>>>> Thanks. >>>>> >>>>> diff --git a/utils/opcontrol b/utils/opcontrol >>>>> index 8aee35a..285a841 100644 >>>>> --- a/utils/opcontrol >>>>> +++ b/utils/opcontrol >>>>> @@ -1240,7 +1240,7 @@ check_event_mapping_data() >>>>> fi >>>>> fi >>>>> fi >>>>> - len=`echo -n $event_num | wc -m` >>>>> + len=`echo -n $event_num | wc -c` >>>>> num_chars_in_grpid=`expr $len - 2` >>>>> GRP_NUM_VAL=`echo | awk '{print substr("'"${event_num}"'",1,"'"${num_chars_in_grpid}"'")}'` >>>>> if [ "$GRP_NUM_CK_VAL" = "" ] ; then >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Join us December 9, 2009 for the Red Hat Virtual Experience, >>>>> a free event focused on virtualization and cloud computing. >>>>> Attend in-depth sessions from your desk. Your couch. Anywhere. >>>>> http://p.sf.net/sfu/redhat-sfdev2dev >>>>> _______________________________________________ >>>>> oprofile-list mailing list >>>>> opr...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/oprofile-list > |