This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2] Add malloc micro benchmark
On 01/04/2018 05:48 AM, Wilco Dijkstra wrote:
> Carlos O'Donell wrote:
>>
>> Don't use mallopt, please make it a tunable then.
>>
>> The mallopt API already had 2 secret arena options which eventually became
>> so well used they were baked into the API and had to be made public.
>
> Unfortunately tunables are not exported so you can't use them outside of GLIBC:
>
> /build/glibc/benchtests/bench-malloc-simple.o: In function `bench':
> bench-malloc-simple.c:(.text+0x19c): undefined reference to `__tunable_set_val'
> collect2: error: ld returned 1 exit status
Correct, we only have a env-var frontend right now, and the internal API is not
made accessible via GLIBC_PRIVATE.
You have 3 options for tests:
* Use the env vars to adjust test behaviour. Run the tests multiple times.
* Add a new C API frontend, very valuable, but more time consuming.
* Expose the existing internal C API via GLIBC_PRIVATE for testing, and throw
it away later when we get a proper C API frontend.
--
Cheers,
Carlos.