glibc/sysdeps
Adhemerval Zanella f4c142bb9f arm: Use _dl_find_object on __gnu_Unwind_Find_exidx (BZ 31405)
Instead of __dl_iterate_phdr. On ARM dlfo_eh_frame/dlfo_eh_count
maps to PT_ARM_EXIDX vaddr start / length.

On a Neoverse N1 machine with 160 cores, the following program:

  $ cat test.c
  #include <stdlib.h>
  #include <pthread.h>
  #include <assert.h>

  enum {
    niter = 1024,
    ntimes = 128,
  };

  static void *
  tf (void *arg)
  {
    int a = (int) arg;

    for (int i = 0; i < niter; i++)
      {
        void *p[ntimes];
        for (int j = 0; j < ntimes; j++)
  	p[j] = malloc (a * 128);
        for (int j = 0; j < ntimes; j++)
  	free (p[j]);
      }

    return NULL;
  }

  int main (int argc, char *argv[])
  {
    enum { nthreads = 16 };
    pthread_t t[nthreads];

    for (int i = 0; i < nthreads; i ++)
      assert (pthread_create (&t[i], NULL, tf, (void *) i) == 0);

    for (int i = 0; i < nthreads; i++)
      {
        void *r;
        assert (pthread_join (t[i], &r) == 0);
        assert (r == NULL);
      }

    return 0;
  }
  $ arm-linux-gnueabihf-gcc -fsanitize=address test.c -o test

Improves from ~15s to 0.5s.

Checked on arm-linux-gnueabihf.
2024-02-23 08:50:00 -03:00
..
aarch64 string: Use builtins for ffs and ffsll 2024-02-01 09:31:33 -03:00
alpha string: Use builtins for ffs and ffsll 2024-02-01 09:31:33 -03:00
arc string: Use builtins for ffs and ffsll 2024-02-01 09:31:33 -03:00
arm arm: Use _dl_find_object on __gnu_Unwind_Find_exidx (BZ 31405) 2024-02-23 08:50:00 -03:00
csky Refer to C23 in place of C2X in glibc 2024-02-01 11:02:01 +00:00
generic string: Use builtins for ffs and ffsll 2024-02-01 09:31:33 -03:00
gnu Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hppa Refer to C23 in place of C2X in glibc 2024-02-01 11:02:01 +00:00
htl Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurd Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
i386 i386: Use generic memrchr in libc (bug 31316) 2024-02-16 07:41:04 +01:00
ieee754 Rename c2x / gnu2x tests to c23 / gnu23 2024-02-01 17:55:57 +00:00
loongarch Apply the Makefile sorting fix 2024-02-15 11:19:56 -08:00
m68k string: Use builtins for ffs and ffsll 2024-02-01 09:31:33 -03:00
mach Implement setcontext/getcontext/makecontext/swapcontext for Hurd x86_64 2024-02-17 21:45:35 +01:00
microblaze Refer to C23 in place of C2X in glibc 2024-02-01 11:02:01 +00:00
mips math: Update mips64 ulps 2024-02-22 21:28:25 +01:00
nios2 Refer to C23 in place of C2X in glibc 2024-02-01 11:02:01 +00:00
nptl Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
or1k Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
posix Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
powerpc Rename c2x / gnu2x tests to c23 / gnu23 2024-02-01 17:55:57 +00:00
pthread Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
riscv Refer to C23 in place of C2X in glibc 2024-02-01 11:02:01 +00:00
s390 string: Use builtins for ffs and ffsll 2024-02-01 09:31:33 -03:00
sh Refer to C23 in place of C2X in glibc 2024-02-01 11:02:01 +00:00
sparc sparc: Treat the version field in the FPU control word as reserved 2024-02-19 10:55:50 -03:00
unix Linux: Switch back to assembly syscall wrapper for prctl (bug 29770) 2024-02-17 09:17:04 +01:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
x86 Apply the Makefile sorting fix 2024-02-15 11:19:56 -08:00
x86_64 Apply the Makefile sorting fix 2024-02-15 11:19:56 -08:00