Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/gmon PR/56246: Yuichiro Naito: gprof(1) never show ...



details:   https://anonhg.NetBSD.org/src/rev/0f75d98ab9ea
branches:  trunk
changeset: 380046:0f75d98ab9ea
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jul 03 14:08:55 2021 +0000

description:
PR/56246: Yuichiro Naito: gprof(1) never show call graphs when profiling
multi-threaded application

diffstat:

 lib/libc/gmon/gmon.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r c1a76d78813d -r 0f75d98ab9ea lib/libc/gmon/gmon.c
--- a/lib/libc/gmon/gmon.c      Sat Jul 03 14:07:13 2021 +0000
+++ b/lib/libc/gmon/gmon.c      Sat Jul 03 14:08:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gmon.c,v 1.35 2014/09/18 13:58:20 christos Exp $       */
+/*     $NetBSD: gmon.c,v 1.36 2021/07/03 14:08:55 christos Exp $       */
 
 /*
  * Copyright (c) 2003, 2004 Wasabi Systems, Inc.
@@ -69,7 +69,7 @@
 #if 0
 static char sccsid[] = "@(#)gmon.c     8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: gmon.c,v 1.35 2014/09/18 13:58:20 christos Exp $");
+__RCSID("$NetBSD: gmon.c,v 1.36 2021/07/03 14:08:55 christos Exp $");
 #endif
 #endif
 
@@ -231,6 +231,7 @@ struct gmonparam *
                    PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, (off_t)0);
                p = (void *)cp;
                *p = _gmonparam;
+               p->state = GMON_PROF_ON;
                p->kcount = NULL;
                cp += sizeof (struct gmonparam);
                memset(cp, 0, (size_t)(p->fromssize + p->tossize));



Home | Main Index | Thread Index | Old Index