Giovanni Azua | 24 Apr 2012 10:03
Picon
Gravatar

installing on Mac OS X

Hello,

I would like to install perfmon2 in Mac OS X 10.7.3. I was wondering if Mac OS is supported at all?

$ uname -a
Darwin Macintosh-4.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012;
root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64

I couldn't get the Makefile to work correctly generating shared library i.e. with configuration
parameter CONFIG_PFMLIB_SHARED?=y. The output becomes:
$ make clean && make BITMODE=64 install
...
building: libpfm.a
mkdir -p /usr/local/lib
install -m 644 libpfm.a /usr/local/lib
install  /usr/local/lib
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...
make[1]: *** [install] Error 64
make: *** [install] Error 2

Can anyone advice what's wrong here? in the second install attempt nothing is passed as install input.

TIA,
Best regards,
Giovanni
------------------------------------------------------------------------------
(Continue reading)

stephane eranian | 24 Apr 2012 13:14

Re: installing on Mac OS X

On Tue, Apr 24, 2012 at 10:03 AM, Giovanni Azua <bravegag <at> gmail.com> wrote:
> Hello,
>
> I would like to install perfmon2 in Mac OS X 10.7.3. I was wondering if Mac OS is supported at all?
>
MAC OS X is not supported at all.
The perfmon2 project has been abandoned since 2009.

If you are interested in the event library, libpfm, then there is a new version
called libpfm4 which compiles on Mac OS X but does not produce any measurements
because I don't know the MAC OS X performance monitoring interface.

The libpfm4 source can be retrieved from: http://perfmon2.sf.net

> $ uname -a
> Darwin Macintosh-4.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012;
root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64
>
> I couldn't get the Makefile to work correctly generating shared library i.e. with configuration
parameter CONFIG_PFMLIB_SHARED?=y. The output becomes:
> $ make clean && make BITMODE=64 install
> ...
> building: libpfm.a
> mkdir -p /usr/local/lib
> install -m 644 libpfm.a /usr/local/lib
> install  /usr/local/lib
> usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
>               [-o owner] file1 file2
>       install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
>               [-o owner] file1 ... fileN directory
(Continue reading)

Giovanni Azua | 24 Apr 2012 14:02
Picon
Gravatar

Re: installing on Mac OS X

Hello Eranian,

On Apr 24, 2012, at 1:14 PM, stephane eranian wrote:
> MAC OS X is not supported at all.
> The perfmon2 project has been abandoned since 2009.
> [snip]

Thank you for your answer. Now I'm a bit thrilled, despite the make error, I managed to get the tests working
and the output is below. I was able able to execute your examples successfully as well. How come the tests
output that everything works fine?

"Architecture specific tests:
	 140 x86 events: 0 errors
All tests passed"

Can you please clarify? 

Best regards,
Giovanni

Users/bravegag/code/libpfm-4.2.0$ make clean && make BITMODE=64 install
rm -f -f *.o *.lo *.a *.so* *~ *.
rm -f -f *.o validate *~
rm -f -f *.o showevtinfo check_events *~
make[1]: Nothing to be done for `clean'.
make[1]: Nothing to be done for `clean'.
installing in
cc  -g -Wall -Werror -I. -I/Users/bravegag/code/libpfm-4.2.0/lib/../include -DCONFIG_PFMLIB_DEBUG
-D_REENTRANT -I. -DCONFIG_PFMLIB_ARCH_X86 -DCONFIG_PFMLIB_ARCH_X86_64 -I. -c pfmlib_common.c
cc  -g -Wall -Werror -I. -I/Users/bravegag/code/libpfm-4.2.0/lib/../include -DCONFIG_PFMLIB_DEBUG
(Continue reading)

stephane eranian | 25 Apr 2012 18:52

Re: installing on Mac OS X

On Tue, Apr 24, 2012 at 2:02 PM, Giovanni Azua <bravegag <at> gmail.com> wrote:
> Hello Eranian,
>
> On Apr 24, 2012, at 1:14 PM, stephane eranian wrote:
>> MAC OS X is not supported at all.
>> The perfmon2 project has been abandoned since 2009.
>> [snip]
>
>
> Thank you for your answer. Now I'm a bit thrilled, despite the make error, I managed to get the tests working
and the output is below. I was able able to execute your examples successfully as well. How come the tests
output that everything works fine?
>
> "Architecture specific tests:
>         140 x86 events: 0 errors
> All tests passed"
>
> Can you please clarify?
>
> Best regards,
> Giovanni
>
> Users/bravegag/code/libpfm-4.2.0$ make clean && make BITMODE=64 install

For the install to work, you need to be root.

Also make sure you pull again from the GIT tree. I fixed a problem on MAC OS x
just today.

> rm -f -f *.o *.lo *.a *.so* *~ *.
(Continue reading)

Giovanni Azua | 25 Apr 2012 19:10
Picon
Gravatar

Re: installing on Mac OS X

Hello Eranian,

On Apr 25, 2012, at 6:52 PM, stephane eranian wrote:
>> On Apr 24, 2012, at 1:14 PM, stephane eranian wrote:
>>> MAC OS X is not supported at all.
>>> The perfmon2 project has been abandoned since 2009.
>>> [snip]
>> 
> For the install to work, you need to be root.
> 
> Also make sure you pull again from the GIT tree. I fixed a problem on MAC OS x
> just today.
> 
>> Architecture specific tests:
>>         140 x86 events: 0 errors
>> All tests passed

Do you confirm that perfmon2 then works for Mac OS X? and that the tests passing is not mere coincidence?

Yes I ran it as root of course, it wouldn't install otherwise.

I will checkout and reinstall from your "trunk" then.

Thanks in advance,
Best regards,
Giovanni
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
(Continue reading)

stephane eranian | 25 Apr 2012 19:14

Re: installing on Mac OS X

On Wed, Apr 25, 2012 at 7:10 PM, Giovanni Azua <bravegag <at> gmail.com> wrote:
> Hello Eranian,
>
> On Apr 25, 2012, at 6:52 PM, stephane eranian wrote:
>>> On Apr 24, 2012, at 1:14 PM, stephane eranian wrote:
>>>> MAC OS X is not supported at all.
>>>> The perfmon2 project has been abandoned since 2009.
>>>> [snip]
>>>
>> For the install to work, you need to be root.
>>
>> Also make sure you pull again from the GIT tree. I fixed a problem on MAC OS x
>> just today.
>>
>>> Architecture specific tests:
>>>         140 x86 events: 0 errors
>>> All tests passed
>
> Do you confirm that perfmon2 then works for Mac OS X? and that the tests passing is not mere coincidence?
>
No it does not.
perfmon2 or perf_event do not work on Mac OS X.

The tests are just validating the event tables, they are not measuring anything.

> Yes I ran it as root of course, it wouldn't install otherwise.
>
> I will checkout and reinstall from your "trunk" then.
>
> Thanks in advance,
(Continue reading)


Gmane