From owner-freebsd-current@FreeBSD.ORG Thu Nov 19 01:33:03 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D59111065670; Thu, 19 Nov 2009 01:33:03 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 059CF8FC08; Thu, 19 Nov 2009 01:33:02 +0000 (UTC) Received: by bwz5 with SMTP id 5so2041126bwz.3 for ; Wed, 18 Nov 2009 17:33:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=d/QeKH7Mrm6ZuT5A6r1EZgXKE//BavuLaFDzom6KVCc=; b=EG/UNoc9zx6k/W4GvAc8+a+YNNRYJmyxFi5JrpijAPAit7lb9V890oT/rxX2BPe0ug MMrUSgXrZo1rxvica1KBcXWdmyDtJrUXnKahtxxn2koiuL/pgQBQJydTXJwIgtUv3x2+ escxuUFbXS8IqZy9voRMLHxWWwNZ8rXq9lyIQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=F800/b3AGjSM1DCOjNFoMkGw2nJW6jDVdmP7liy7WHFkZzpwwGz8SKSrnh8BR7UHAu g5GawvaTqVNeP5eQB7lUP4e60djVEJnqhdI+tCfS6ZV8eFUqexsgVprgQu2BLGKS3aaB sj5k+SRUB8q3S+jZ8Q5ulNf8SS14jCCc3QOWo= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.4.193 with SMTP id 1mr2862360fas.12.1258594381951; Wed, 18 Nov 2009 17:33:01 -0800 (PST) In-Reply-To: <9C740225-CB30-4D26-8E4B-F9D5DC51B899@FreeBSD.org> References: <3bbf2fe10911160718j7784b311g2980aa02c79bc9ec@mail.gmail.com> <20091117141713.GA51251@sandvine.com> <9C740225-CB30-4D26-8E4B-F9D5DC51B899@FreeBSD.org> Date: Thu, 19 Nov 2009 02:33:01 +0100 X-Google-Sender-Auth: 9b6d5f7c7682a6f2 Message-ID: <3bbf2fe10911181733j598083feiddf3d4b34d0007d6@mail.gmail.com> From: Attilio Rao To: "Robert N. M. Watson" Content-Type: text/plain; charset=UTF-8 Cc: freebsd-current@freebsd.org, Ed Maste Subject: Re: [PATCH] Let gcore use ptrace interface rather than the procfs X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 01:33:03 -0000 2009/11/17 Robert N. M. Watson : > > On 17 Nov 2009, at 14:17, Ed Maste wrote: > >> Our original motivation for doing this was to make gcore work with >> threaded apps, not avoiding procfs, but that's a useful side-effect of >> the work. Note though that for that purpose it isn't complete; procfs >> is still used in readmap to read the process' memory map. It looks like >> we need to find a way to implement readmap without procfs. > > Are the sysctls used for procstat -v sufficient for this purpose? This patch should address the arised concerns by both of you: http://www.freebsd.org/~attilio/Sandvine/STABLE_8/gcore/gcore2.diff and additively fix elf_getstatus() to not use procfs, so that gcore is completely procfs independent now. Comments, reviews and testing are welcome. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein