From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97168 invoked by alias); 26 Aug 2015 11:16:50 -0000 Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org Received: (qmail 97141 invoked by uid 89); 26 Aug 2015 11:16:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: smtp-relay.CeBiTec.Uni-Bielefeld.DE Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Aug 2015 11:16:48 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id CFE9D4FB; Wed, 26 Aug 2015 13:16:45 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qfXoXlfkNYzU; Wed, 26 Aug 2015 13:16:44 +0200 (CEST) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id B73D54FA; Wed, 26 Aug 2015 13:16:43 +0200 (CEST) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.1+Sun/8.15.1/Submit) id t7QBGgJE017860; Wed, 26 Aug 2015 13:16:42 +0200 (CEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: java-patches@gcc.gnu.org Subject: [boehm-gc] Avoid unstructured procfs on Solaris Date: Wed, 26 Aug 2015 11:16:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (usg-unix-v) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2015-q3/txt/msg00043.txt.bz2 --=-=-= Content-Type: text/plain Content-length: 826 boehm-gc doesn't currently build on Solaris 12 since that release finally removed the old unstructured /proc, thus the PIOCOPENPD ioctl. This is already mentioned in the Solaris 11 EOF list: http://www.oracle.com/technetwork/systems/end-of-notices/eonsolaris11-392732.html Since the replacement (using /proc//pagedata directly) has been available since Solaris 2.6 in 1997, there's no need to retain the old code, especially given that mainline only supports Solaris 10 and up. Bootstrapped without regressions on i386-pc-solaris2.1[12] and sparc-sun-solaris2.1[12], will install on mainline. Will backport to the gcc 5 branch after some soak time. Rainer 2015-02-10 Rainer Orth * os_dep.c [GC_SOLARIS_THREADS] (GC_dirty_init): Use /proc//pagedata instead of PIOCOPENPD. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=sol12-boehm-gc-proc.patch Content-length: 784 # HG changeset patch # Parent 819be80e1b9c7e840fe5d232d64cf106869a933d Avoid unstructured procfs on Solaris 12+ diff --git a/boehm-gc/os_dep.c b/boehm-gc/os_dep.c --- a/boehm-gc/os_dep.c +++ b/boehm-gc/os_dep.c @@ -3184,13 +3184,11 @@ void GC_dirty_init() (GC_words_allocd + GC_words_allocd_before_gc)); # endif } - sprintf(buf, "/proc/%d", getpid()); - fd = open(buf, O_RDONLY); - if (fd < 0) { + sprintf(buf, "/proc/%d/pagedata", getpid()); + GC_proc_fd = open(buf, O_RDONLY); + if (GC_proc_fd < 0) { ABORT("/proc open failed"); } - GC_proc_fd = syscall(SYS_ioctl, fd, PIOCOPENPD, 0); - close(fd); syscall(SYS_fcntl, GC_proc_fd, F_SETFD, FD_CLOEXEC); if (GC_proc_fd < 0) { ABORT("/proc ioctl failed"); --=-=-= Content-Type: text/plain Content-length: 144 -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University --=-=-=--