From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 13563394D839 for ; Tue, 2 Mar 2021 13:42:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 13563394D839 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-239-TC1Rr--BOf6lo3MyvYGf1Q-1; Tue, 02 Mar 2021 08:42:22 -0500 X-MC-Unique: TC1Rr--BOf6lo3MyvYGf1Q-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BE6E780196C; Tue, 2 Mar 2021 13:42:21 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-51.ams2.redhat.com [10.36.112.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0BD5160873; Tue, 2 Mar 2021 13:42:20 +0000 (UTC) From: Florian Weimer To: "H.J. Lu via Libc-alpha" Subject: Re: [PATCH v2 2/2] x86: Add CPU-specific diagnostics to ld.so --list-diagnostics References: <871rcx3m3d.fsf@oldenburg.str.redhat.com> <87tupt27ha.fsf@oldenburg.str.redhat.com> Date: Tue, 02 Mar 2021 14:42:19 +0100 In-Reply-To: (H. J. Lu via Libc-alpha's message of "Tue, 2 Mar 2021 05:11:20 -0800") Message-ID: <878s751xl0.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 13:42:28 -0000 * H. J. Lu via Libc-alpha: >> + print_cpu_feature_preferred >> + ("prefer_no_avx512", >> + CPU_FEATURE_PREFERRED_P (cpu_features, Prefer_No_AVX512)); >> + print_cpu_feature_preferred >> + ("mathvec_prefer_no_avx512", >> + CPU_FEATURE_PREFERRED_P (cpu_features, MathVec_Prefer_No_AVX512)); > > $ grep "#define index_arch_" sysdeps/x86/include/cpu-features.h | awk > '{ print $2 }' | sed -e "s/index_arch_//" > Fast_Rep_String > Fast_Copy_Backward > Slow_BSF > Fast_Unaligned_Load > Prefer_PMINUB_for_stringop > Fast_Unaligned_Copy > I586 > I686 > Slow_SSE4_2 > AVX_Fast_Unaligned_Load > Prefer_MAP_32BIT_EXEC > Prefer_No_VZEROUPPER > Prefer_ERMS > Prefer_No_AVX512 > MathVec_Prefer_No_AVX512 > Prefer_FSRM > > sysdeps/x86/configure.ac can generate the list. Okay, I will automate this in some way. >> + print_cpu_features_value ("level3_cache_linesize", >> + cpu_features->level3_cache_linesize); >> + print_cpu_features_value ("level4_cache_size", >> + cpu_features->level4_cache_size); > > Please assert size of *cpu_features == offfset of level4_cache_size > + sizeof (level4_cache_size). I'm going to add a static assert. Thanks, Florian