Comment 2 for bug 573366

Revision history for this message
Mark Callaghan (mdcallag) wrote : Re: [Bug 573366] Re: cpu_set_t not available on OsX, line:123 ./mysys/my_perf.c, won't compile

I no longer have an OS X laptop. So there is no chance I will push a
patch. A reasonable fix is to disable this for OS X. We shouldn't try
to make MySQL faster on OS X as the system support (threading,
mutexes, ...) isn't optimized to scale on multi-core servers.

On Sun, May 2, 2010 at 1:29 AM, Guido Serra <email address hidden> wrote:
> k, the workaround doesn't seem to be so quick at all... :-(
>
> I have was looking at the logic you implemented, and needs to be
> enhanced substituting macros as your colleagues of the "xhprof patch"
> did.
>
> I found the reference for OsX here
> http://developer.apple.com/mac/library/releasenotes/Performance/RN-
> AffinityAPI/
>
> I tried to put in place the macros of ur colleagues, but still, I have
> found no equivalent for CPU_CLR
>
> --
> cpu_set_t not available on OsX, line:123 ./mysys/my_perf.c, won't compile
> https://bugs.launchpad.net/bugs/573366
> You received this bug notification because you are a member of
> MySQLAtFacebook, which is the registrant for MySQLAtFacebook.
>
> Status in MySQL at Facebook: New
>
> Bug description:
> as for similar software... http://blog.svilen.com/2009/05/facebooks-xhprof-php-module-patch-for.html
>
> that datatype is not available on OsX with that name, see the linked patch above, there is a quick workaround
>
> gcc -DDEFAULT_BASEDIR=\"/Users/zeph/Documents/workspace/mysqlatfacebook-5.1-build\" -DMYSQL_DATADIR="\"/Users/zeph/Documents/workspace/mysqlatfacebook-5.1-build/var\"" -DDEFAULT_CHARSET_HOME="\"/Users/zeph/Documents/workspace/mysqlatfacebook-5.1-build\"" -DSHAREDIR="\"/Users/zeph/Documents/workspace/mysqlatfacebook-5.1-build/share/mysql\"" -DDEFAULT_HOME_ENV=MYSQL_HOME -DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX -DDEFAULT_SYSCONFDIR="\"/Users/zeph/Documents/workspace/mysqlatfacebook-5.1-build/etc\"" -DHAVE_CONFIG_H -I. -I../include -I../include -I../include -I.    -g -O2   -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT  -DDONT_DECLARE_CXA_PURE_VIRTUAL -MT my_perf.o -MD -MP -MF .deps/my_perf.Tpo -c -o my_perf.o my_perf.c
> my_perf.c: In function ‘my_init_fast_timer’:
> my_perf.c:123: error: ‘cpu_set_t’ undeclared (first use in this function)
> my_perf.c:123: error: (Each undeclared identifier is reported only once
> my_perf.c:123: error: for each function it appears in.)
> my_perf.c:123: error: expected ‘;’ before ‘mask’
> my_perf.c:124: error: ‘mask’ undeclared (first use in this function)
> make[1]: *** [my_perf.o] Error 1
> make: *** [all-recursive] Error 1
>
>
>

--
Mark Callaghan
<email address hidden>