From owner-freebsd-java@freebsd.org Fri Nov 10 08:35:15 2017 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77058E68260 for ; Fri, 10 Nov 2017 08:35:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 5E8736B0A2 for ; Fri, 10 Nov 2017 08:35:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 5DDA7E6825E; Fri, 10 Nov 2017 08:35:15 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D80CE6825D for ; Fri, 10 Nov 2017 08:35:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BB6F6B0A1 for ; Fri, 10 Nov 2017 08:35:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id vAA8ZEU9077268 for ; Fri, 10 Nov 2017 08:35:15 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: [Bug 223589] [PATCH] java/openjdk8: support setting thread name in OpenJDK8 Date: Fri, 10 Nov 2017 08:35:14 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: bra@fsn.hu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: java@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Nov 2017 08:35:15 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D223589 Bug ID: 223589 Summary: [PATCH] java/openjdk8: support setting thread name in OpenJDK8 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Keywords: patch Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: java@FreeBSD.org Reporter: bra@fsn.hu Assignee: java@FreeBSD.org Flags: maintainer-feedback?(java@FreeBSD.org) Keywords: patch Created attachment 187902 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D187902&action= =3Dedit openjdk8 thread name patch The following patch makes OpenJDK8 able to set threads' native name, which = is quite useful for debugging which thread uses resources. Before the patch you can see this in top: 43720 tomcat 20 0 11563M 9233M kqread 7 1:12 0.45% java{ja= va} 43720 tomcat 20 0 11563M 9233M kqread 8 1:17 0.45% java{ja= va} 43720 tomcat 20 0 11563M 9233M kqread 5 1:09 0.44% java{ja= va} 43720 tomcat 20 0 11563M 9233M kqread 15 1:19 0.44% java{ja= va} 43720 tomcat 20 0 11563M 9233M kqread 16 0:58 0.44% java{ja= va} 43720 tomcat 20 0 11563M 9233M kqread 6 1:15 0.44% java{ja= va} 43720 tomcat 20 0 11563M 9233M kqread 3 1:16 0.43% java{ja= va} 43720 tomcat 20 0 11563M 9233M kqread 12 1:15 0.43% java{ja= va} 43720 tomcat 20 0 11563M 9233M kqread 18 1:24 0.40% java{ja= va} after the patch: 46396 tomcat 21 0 7228M 1004M uwait 3 0:46 7.80% java{C2 CompilerThread1} 46396 tomcat 20 0 7228M 1004M uwait 2 0:49 2.73% java{C2 CompilerThread0} 46396 tomcat 20 0 7228M 1004M uwait 0 0:42 1.83% java{qtp927744186-64} 46396 tomcat 20 0 7228M 1004M select 1 0:03 0.01% java{A= MQP Connection 0:0} 46349 tomcat 20 0 7005M 816M kqread 1 0:02 0.00% java{pool-7-thread-1} 46396 tomcat 20 0 7228M 1004M kqread 0 0:09 0.10% java{lettuce-nioEventLoo} According to thr_set_name(2), the thread's name can be maximum 19 characters (MAXCOMLEN + 1 bytes), we'll give a buffer of that size just to be sure. The MacOS code prefixes everthing with "Java", but it's totally useless (as= can be seen above, just eats valuable space), so use only the name which is giv= en by the caller. --=20 You are receiving this mail because: You are the assignee for the bug.=