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 [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 40D173954E15 for ; Thu, 8 Dec 2022 08:31:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 40D173954E15 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670488309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7ppo8rmpcezvhtIROzaf/bMXyE0TUMQ4SqHweA2WcCo=; b=X5ea0Chhpe34P9uKCzIz9JwqJiT5wZguZxOWJM901l+2uFAKKANBV3TphDpFvf/FYr1x6x pobmXJXqhyORvaPTRW3UxY8HKF6cCIl//s8cwkmE73XZ1J+DzDWbY30KU0KgYtjA1tO9mI vQ9bzWrmKJ/lBdhHbq+F4fTUjd71iRU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-36-s3mWEE2EMGG-2Ds0XEHyQQ-1; Thu, 08 Dec 2022 03:31:46 -0500 X-MC-Unique: s3mWEE2EMGG-2Ds0XEHyQQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4F0F9803B38; Thu, 8 Dec 2022 08:31:46 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EB9CE492CA2; Thu, 8 Dec 2022 08:31:44 +0000 (UTC) From: Florian Weimer To: Vineet Gupta via Libc-help Cc: Vineet Gupta , siddhesh@gotplt.org, goldstein.w.n@gmail.com, hjl.tools@gmail.com Subject: Re: glibc tunables to disable axv not updating memcpy References: <6d615a11-b863-1d76-e0ce-1f064cda06f1@linux.dev> Date: Thu, 08 Dec 2022 09:31:41 +0100 In-Reply-To: <6d615a11-b863-1d76-e0ce-1f064cda06f1@linux.dev> (Vineet Gupta via Libc-help's message of "Wed, 7 Dec 2022 19:47:43 -0800") Message-ID: <87bkoejnyq.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * Vineet Gupta via Libc-help: > Hi, > > I've been playing with x86_64 tunables to see how they are plumbed > into ifunc machinery, but running into a something which I don't > understand (this is glibc 2.35 so pretty recent). > > I'm disabling AVX and friends as: > export > GLIBC_TUNABLES=glibc.cpu.hwcaps=--SSSE3,-SSE4_2,AVX,-AVX2,-AVX512F,-AVX512VL > > > A simple program which calls memcpy, seems to be calling > __memmove_evex_unaligned_erms() despite my tunable disabling AVX512VL. > > | > | main (argc=2, argv=0x7fffffffdce8) at test-mcpu.c:10 > | 10 memcpy(dest, src, atoi(argv[1])); > | (gdb) s > | __memmove_evex_unaligned_erms () at > ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:307 > | 307 ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S > > > glibc dependency on AVX512VL for the said routine/ > > | IFUNC_IMPL_ADD (array, i, memmove, > | CPU_FEATURE_USABLE (AVX512VL), > | __memmove_evex_unaligned_erms) > | This is for the test suite and the benchmarks. The production selector is in sysdeps/x86_64/multiarch/ifunc-memmove.h. You should be able to set a line-based breakpoint and single-step through it. > LD_DEBUG=all doesn't print any ifunc related info. I want to add logging, which is why I asked on the binutils list: Subject: Named local symbols in the ELF dynamic symbol table To: binutils@sourceware.org Date: Tue, 06 Dec 2022 18:11:08 +0100 (1 day, 15 hours, 17 minutes ago) Message-ID: <87y1rke9ub.fsf@oldenburg.str.redhat.com> If we have the symbol names in the dynamic symbol tables, we can use dladdr or a custom implementation of it to get symbol names. If I don't get a reply, I'll settle for printing relative addresses. People can then use an external tool to resolve them to symbols. Thanks, Florian