From patchwork Wed Aug 26 11:16:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 510806 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E479D1401DA for ; Wed, 26 Aug 2015 21:16:57 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=ew4lQrZt; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=RYV9PSCoveSlxbNrQWOeoiMnU/WGBqMGi2sXGHTyXVKSPWkY1T Uj9X3PEv3hjk3vfDYKgLymB83szGBE1Wis2q3nkhyCguq8eiXWrVRH9cWXGJF/ts 9fFsYt42pMFH3JTs8ziBGBR111j3E9QPBIuW92z40oGyna909xSXlUmBA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; s= default; bh=7hUTgx9zd4I9ph94BYzTI/N8dwI=; b=ew4lQrZt+PuzzEWzf32Z AuhiSTkxITVVoSCAN6JCED+s8sCOZzDzMoY1i7XCJRR2JQI35dlI4xj9IwxPEW8j LV6/wbYUnfPTiZBvtfKKWqzOp74hyz33nUdkbCB4DNqJrPH2NFF71QOgxxf+EQFU VGbk22+MlfZgk/Cwvh9UPyw= Received: (qmail 97161 invoked by alias); 26 Aug 2015 11:16:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@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 13:16:42 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes 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. # 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");