Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ld.elf_so ld.elf_so: Make tls alloc debug messages m...



details:   https://anonhg.NetBSD.org/src/rev/3257d20adf34
branches:  trunk
changeset: 376106:3257d20adf34
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Jun 01 08:20:10 2023 +0000

description:
ld.elf_so: Make tls alloc debug messages more detailed and greppable.

XXX pullup-10

diffstat:

 libexec/ld.elf_so/tls.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (39 lines):

diff -r 0484f1d8c543 -r 3257d20adf34 libexec/ld.elf_so/tls.c
--- a/libexec/ld.elf_so/tls.c   Thu Jun 01 07:44:10 2023 +0000
+++ b/libexec/ld.elf_so/tls.c   Thu Jun 01 08:20:10 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tls.c,v 1.16 2023/05/31 18:44:39 riastradh Exp $       */
+/*     $NetBSD: tls.c,v 1.17 2023/06/01 08:20:10 riastradh Exp $       */
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: tls.c,v 1.16 2023/05/31 18:44:39 riastradh Exp $");
+__RCSID("$NetBSD: tls.c,v 1.17 2023/06/01 08:20:10 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/ucontext.h>
@@ -129,7 +129,7 @@ static struct tls_tcb *
        tcb = (struct tls_tcb *)p;
        tcb->tcb_self = tcb;
 #endif
-       dbg(("tcb %p", tcb));
+       dbg(("lwp %d tls tcb %p", _lwp_self(), tcb));
        tcb->tcb_dtv = xcalloc(sizeof(*tcb->tcb_dtv) * (2 + _rtld_tls_max_index));
        ++tcb->tcb_dtv;
        SET_DTV_MAX_INDEX(tcb->tcb_dtv, _rtld_tls_max_index);
@@ -142,8 +142,9 @@ static struct tls_tcb *
 #else
                        q = p - obj->tlsoffset;
 #endif
-                       dbg(("obj %p dtv %p tlsoffset %zu",
-                           obj, q, obj->tlsoffset));
+                       dbg(("%s: [lwp %d] tls dtv %p index %zu offset %zu",
+                           obj->path, _lwp_self(),
+                           q, obj->tlsindex, obj->tlsoffset));
                        if (obj->tlsinitsize)
                                memcpy(q, obj->tlsinit, obj->tlsinitsize);
                        tcb->tcb_dtv[obj->tlsindex] = q;



Home | Main Index | Thread Index | Old Index