This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.23-211-g593285a


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  593285ac1520e54467573c3a73cdda26a6a5acea (commit)
      from  d20dce250a6852f5083c05997fc6397c5d438a96 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=593285ac1520e54467573c3a73cdda26a6a5acea

commit 593285ac1520e54467573c3a73cdda26a6a5acea
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Tue Apr 19 00:54:24 2016 +0200

    hurd: fix profiling short-living processes
    
    	* sysdeps/mach/hurd/profil.c (update_waiter): Initialize
    	profil_reply_port.
    	(profile_waiter): Do not initialize profil_reply_port.

diff --git a/ChangeLog b/ChangeLog
index 200cfcb..04f5693 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-04-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+	* sysdeps/mach/hurd/profil.c (update_waiter): Initialize
+	profil_reply_port.
+	(profile_waiter): Do not initialize profil_reply_port.
+
 2016-04-18  Wilco Dijkstra  <wdijkstr@arm.com>
 
 	[BZ #18712]
diff --git a/sysdeps/mach/hurd/profil.c b/sysdeps/mach/hurd/profil.c
index dd77cd3..be249bb 100644
--- a/sysdeps/mach/hurd/profil.c
+++ b/sysdeps/mach/hurd/profil.c
@@ -40,7 +40,7 @@ static mach_msg_timeout_t collector_timeout; /* ms between collections.  */
 static int profile_tick;
 
 /* Reply port used by profiler thread */
-static mach_port_t profil_reply_port;
+static mach_port_t profil_reply_port = MACH_PORT_NULL;
 
 /* Forwards */
 static kern_return_t profil_task_get_sampled_pcs (mach_port_t,
@@ -63,6 +63,8 @@ update_waiter (u_short *sample_buffer, size_t size, size_t offset, u_int scale)
 
   if (profile_thread == MACH_PORT_NULL)
     {
+      if (profil_reply_port == MACH_PORT_NULL)
+	profil_reply_port = __mach_reply_port ();
       /* Set up the profiling collector thread.  */
       err = __thread_create (__mach_task_self (), &profile_thread);
       if (! err)
@@ -182,7 +184,6 @@ profile_waiter (void)
   mach_msg_header_t msg;
   mach_port_t timeout_reply_port;
 
-  profil_reply_port = __mach_reply_port ();
   timeout_reply_port = __mach_reply_port ();
 
   while (1)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                  |    6 ++++++
 sysdeps/mach/hurd/profil.c |    5 +++--
 2 files changed, 9 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]