From owner-svn-src-head@freebsd.org Tue Jul 3 18:19:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86588103A566; Tue, 3 Jul 2018 18:19:14 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 32D188FE0B; Tue, 3 Jul 2018 18:19:14 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f48.google.com (mail-it0-f48.google.com [209.85.214.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id EAC8A161E2; Tue, 3 Jul 2018 18:19:13 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f48.google.com with SMTP id p17-v6so4495600itc.2; Tue, 03 Jul 2018 11:19:13 -0700 (PDT) X-Gm-Message-State: APt69E08ByKPkWoz9x9tizrLa8QPdaz2zKgDT5tRlhc63TCqPcsMlCLM D1mOw4UoLIKznGODc4lvrQigFeVFsGq8bBRqbuE= X-Google-Smtp-Source: AAOMgpek94CbAu6gd2Kh6mu0YXTv6Fck4dJAcMNcRoatgFwgvthzrvCHDqN+7C2rQI4CYuItAWVy4oMsDk6QAQJSDkA= X-Received: by 2002:a24:8ac1:: with SMTP id v184-v6mr10144483itd.7.1530641953258; Tue, 03 Jul 2018 11:19:13 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:8d2:0:0:0:0:0 with HTTP; Tue, 3 Jul 2018 11:19:12 -0700 (PDT) In-Reply-To: References: <201807030155.w631tARo009470@repo.freebsd.org> From: Matthew Macy Date: Tue, 3 Jul 2018 11:19:12 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r335879 - in head/sys: conf kern sys To: Bryan Drewery Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2018 18:19:14 -0000 genoffset_test tests that the offsets match up On Tue, Jul 3, 2018 at 11:02 AM, Bryan Drewery wrote: > On 7/2/2018 6:55 PM, Matt Macy wrote: >> Author: mmacy >> Date: Tue Jul 3 01:55:09 2018 >> New Revision: 335879 >> URL: https://svnweb.freebsd.org/changeset/base/335879 >> >> Log: >> make critical_{enter, exit} inline >> >> Avoid pulling in all of the dependencies by >> automatically generating a stripped down thread_lite exporting >> only the fields of interest. The field declarations are type checked >> against the original and the offsets of the generated result is >> automatically checked. >> >> kib has expressed disagreement and would have preferred to simply >> use genassym style offsets (which loses type check enforcement). >> jhb has expressed dislike of it due to header pollution and a >> duplicate structure. He would have preferred to just have defined >> thread in _thread.h. Nonetheless, he admits that this is the only >> viable solution at the moment. >> >> The impetus for this came from mjg's D15331: >> "Inline critical_enter/exit for amd64" >> >> Reviewed by: jeff >> Differential Revision: https://reviews.freebsd.org/D16078 >> >> Added: >> head/sys/kern/genoffset.c (contents, props changed) >> head/sys/kern/genoffset.sh (contents, props changed) >> head/sys/sys/kpilite.h (contents, props changed) >> Modified: >> head/sys/conf/kern.post.mk >> head/sys/conf/kern.pre.mk >> head/sys/kern/kern_switch.c >> head/sys/sys/assym.h >> head/sys/sys/systm.h >> >> Modified: head/sys/conf/kern.post.mk >> ============================================================================== >> --- head/sys/conf/kern.post.mk Mon Jul 2 22:59:29 2018 (r335878) >> +++ head/sys/conf/kern.post.mk Tue Jul 3 01:55:09 2018 (r335879) >> @@ -185,13 +185,25 @@ hack.pico: Makefile >> ${CC} ${HACK_EXTRA_FLAGS} -nostdlib hack.c -o hack.pico >> rm -f hack.c >> >> -assym.inc: $S/kern/genassym.sh genassym.o >> +offset.inc: $S/kern/genoffset.sh genoffset.o >> + NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genoffset.sh genoffset.o > ${.TARGET} >> + >> +genoffset.o: $S/kern/genoffset.c >> + ${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/kern/genoffset.c >> + >> +genoffset_test.c: $S/kern/genoffset.c >> + cp $S/kern/genoffset.c genoffset_test.c >> + >> +genoffset_test.o: genoffset_test.c offset.inc >> + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST genoffset_test.c >> + >> +assym.inc: $S/kern/genassym.sh genassym.o genoffset_test.o >> NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${.TARGET} > > What's genoffset_test? Nothing seems to use it. > > -- > Regards, > Bryan Drewery >