From owner-svn-src-all@freebsd.org Sun Jul 19 12:25:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2AD2935DD46; Sun, 19 Jul 2020 12:25:07 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B8kZp113zz4WwK; Sun, 19 Jul 2020 12:25:05 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-lj1-x243.google.com with SMTP id x9so17344091ljc.5; Sun, 19 Jul 2020 05:25:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to; bh=APFvNwVxWku7kPe3K2alz344bSwocWzhvDwas+XFE2o=; b=LXZRIrzz3gaM1APw/QGFVeimluWnr97QEag7P5rT9VGbQqB8Wyt6pCMglyw0O1b2XR oA4Het0sHxmbTHsgv8EFAf/eUOC3oPAIgrVEk44gKsAlpDFern/RAuiNjSHf7h6ap1Oo dlzavhi5oV7rp86eRM8mrjE1emvxOJtcqzui0gEM65RpLKu9wFW5zCsTBO6qgHQHF4oU opc/nEgcaBGnAHgmgkrCNoAmwvV2g7YshchKoHqCef6WSSJAgfwPSbBFBX4gq/nwxymY w4v788GZUZ1wgTDex835h+d9jfABTRPRCz4JcVPHiTlTj50S1+x58pTsW+dWwHqvPrgD Tb9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=APFvNwVxWku7kPe3K2alz344bSwocWzhvDwas+XFE2o=; b=QoW3sLQt3VFWWPrjCEXnQ3u74cy0tFWZDmdnCVdZWmAccL/CJoVMeyOvI2pjCgSQc3 QCzHzXjFBDlIgAwhbxlUihMqW2dBwMnhIKVbNXDnM1y7w4dsGc6Vc+/L9ESGJPT1f3ev LlSVK0CjKrcWjJEHW89ZTEoOMF0T+sWK5C6x40Uuj9fHu3B8CZX4enEXUvzoXM0yQhVN nVsFLVSrlK92rF4s7StfK5RV8Op+yodhMuPEaaEcWDvy3FgwGtVxV4Bl9GhDML30h7K5 DkIl6ZAnZNMdW+hOEO+TlGyMb1YFRBIXZ3FW1oVp3TXS72CpqwHeqI84bqZnZmp74Ndt ZvYQ== X-Gm-Message-State: AOAM530ihIbjJuCpE5UaS3NpRrBYsSzHpkk1lN//QQ0ofSgb2+EaViEE E2TKpT3kklzDSkFcss+dItpi5mMB X-Google-Smtp-Source: ABdhPJywGjZfKIOslit5PT/4Gag72rpD32ZvliC4ikOZlyTfHvDLmWgdBg97ORq0pngM+M/rk2tbmw== X-Received: by 2002:a5d:4984:: with SMTP id r4mr522608wrq.401.1595161086671; Sun, 19 Jul 2020 05:18:06 -0700 (PDT) Received: from brick (cpc149474-cmbg20-2-0-cust954.5-4.cable.virginm.net. [82.4.199.187]) by smtp.gmail.com with ESMTPSA id n14sm24846294wro.81.2020.07.19.05.18.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jul 2020 05:18:05 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Thu, 23 Jul 2020 14:40:23 +0100 From: Edward Tomasz Napierala To: Kyle Evans Cc: src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r353283 - in head: lib lib/libstats share/man/man3 share/mk sys/amd64/conf sys/conf sys/kern sys/sys tools/build/options Message-ID: <20200723134023.GA2314@brick> Mail-Followup-To: Kyle Evans , src-committers , svn-src-all , svn-src-head References: <201910071905.x97J56t0039812@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4B8kZp113zz4WwK X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=LXZRIrzz; dmarc=none; spf=pass (mx1.freebsd.org: domain of etnapierala@gmail.com designates 2a00:1450:4864:20::243 as permitted sender) smtp.mailfrom=etnapierala@gmail.com X-Spamd-Result: default: False [2.09 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; DATE_IN_FUTURE(4.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-0.55)[-0.554]; FORGED_SENDER(0.30)[trasz@freebsd.org,etnapierala@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[82.4.199.187:received]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[trasz@freebsd.org,etnapierala@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.83)[-0.828]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.83)[-0.825]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::243:from]; MID_RHS_NOT_FQDN(0.50)[]; GREYLIST(0.00)[pass,body]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jul 2020 12:25:07 -0000 On 0714T0838, Kyle Evans wrote: > On Mon, Oct 7, 2019 at 2:05 PM Edward Tomasz Napierala > wrote: [..] > > Added: head/lib/libstats/Makefile > > ============================================================================== > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/lib/libstats/Makefile Mon Oct 7 19:05:05 2019 (r353283) > > @@ -0,0 +1,14 @@ > > +# $FreeBSD$ > > + > > +LIB= stats > > +SHLIBDIR?= /lib > > +SHLIB_MAJOR= 0 > > +SRCS= subr_stats.c > > + > > +# To debug, comment WITHOUT_ASSERT_DEBUG= and uncomment CFLAGS:= > > +WITHOUT_ASSERT_DEBUG= > > +#CFLAGS:=${CFLAGS:C/-O[0-9]/-O0 -g3/} -DDIAGNOSTIC > > + > > Hi, > > What exactly is going on here? mjg pointed this out when we were > looking at some runtime assertion related stuff. This looks like it's > imposing an opinion of how it should be built and circumvent the > normal way of doing things. Ideally, this would something more like > with the following patch to just make sure that the CFLAGS > manipulations properly happen when ASSERT_DEBUG is flipped on, and > interested parties that don't want the assertions should turn > ASSERT_DEBUG off. If there's a really really solid reason for libstats > having its own knob, that should be considered as a formal knob rather > than the ad-hockery that appears above. I'm not sure that the > following patch is entirely correct, though; -DDIAGNOSTIC seems to be > needed for assertions, but the -O$n replacement with -O0 -g3 looks > like it should perhaps be split out to a different knob or.. > something. The main chunk of stats(3) source is shared between libstats(3) and the kernel. Thus, DIAGNOSTICS means the same thing: it's not the usual assertions, but an additional debugging mechanism that's supposed to be off by default. Except that we don't have a global knob to turn "userland DIAGNOSTICS" on, so libstats(3) uses its own. We probably shouldn't be overriding WITHOUT_ASSERT_DEBUG, though. [..]