From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by sourceware.org (Postfix) with ESMTPS id A71893858D20 for ; Sat, 3 Dec 2022 07:57:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A71893858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x534.google.com with SMTP id c66so2946617edf.5 for ; Fri, 02 Dec 2022 23:57:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=K4TF5rRBfXWNemPfT1S4cWZ7023zUTT94Uc+5vkALyU=; b=aB1gvIO6QNrDXe3AXHSo9z6AiUb/cH2NOec4kRLm2cG7yajjI6z1AxqNswseVizTKc 7G+pg+p9OEFi9G39jfXnp/rUpZGFYOPBDsL9yfxIbO31xyBNWI/9Dg3utGWvj+/NpMqK yw9pVmwYpdbNenLAx9YJX2kSy9X5cGzR5nGkXqdnhEZ/jpmX+GdqzQa+jHFcPO+yPZC6 Z5TBQA5xYCNQNbDYVWPpM+/sPQB/T8Q5j08EjK5AZSs9Db0cvltxvhU53FCVwpAlt/jY yc9vqBEO0Dr7uhEIGMuo4Qjq5/EiO1xMEKMW+jtK7oL+Mev3me2Xu3GlVnEeZhBsy7dI dsFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=K4TF5rRBfXWNemPfT1S4cWZ7023zUTT94Uc+5vkALyU=; b=3A0YDe8MzMaI7y4U+aS4c3p8+izgkkOcZb03tL0eAsbc6AcVl6vKXglfVjLpLEdQAY w7FsOXy+T8JQbSbtCSsB9E5KEstw5lutFNyDUnjXLK87/EoA4MyKKXEGNxJ4ms0ws4Pw lI51g81jmLG4oJmuoL7pSI3EB5sI/X1k6YruzXttqG4A6vCpMyh6OTaFRV6cvdfIuv8l JnunpXt1rLOdg8AH7as+8CRyrU0iYwfFD/OLh0OdkXuoOUic2f3a/MU4KetGflboAAeg u7tyg4U3ReIam0lSlQOBGt9KIwVZFCSFfdEtg7tW19Va41OZxmVCWTZ3o1FgA9EQK61i 7PgQ== X-Gm-Message-State: ANoB5pkK+g8nGq4BgqHTKz9BcLnFG9wbDQ+Xj/LRWOBxLundqc24qVJ6 Wgzb/lYwKT/ku10AOwXqYX/qfFyQbulmydPUO0Rhk6Zp X-Google-Smtp-Source: AA0mqf4SxV4PVzDNB8g6GQ5tHjvWvAef4emWVllsgU2waYhRXswv+IY9IaeYxrctVqdPORCnZ2nC2uDCBuIEKPK1N9I= X-Received: by 2002:a05:6402:e8c:b0:468:89dd:aa0b with SMTP id h12-20020a0564020e8c00b0046889ddaa0bmr67652341eda.258.1670054277053; Fri, 02 Dec 2022 23:57:57 -0800 (PST) MIME-Version: 1.0 References: <877czauyjh.fsf@oldenburg.str.redhat.com> In-Reply-To: <877czauyjh.fsf@oldenburg.str.redhat.com> From: Noah Goldstein Date: Fri, 2 Dec 2022 23:57:45 -0800 Message-ID: Subject: Re: ____wcstold_l_internal Question To: Florian Weimer Cc: Samir Droubi via Libc-help , Samir Droubi Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: On Thu, Dec 1, 2022 at 10:09 PM Florian Weimer via Libc-help wrote: > > * Samir Droubi via Libc-help: > > > I was profiling a project that I have been working on and the function > > above shows up amongst other internal functions. I was wondering if > > you could shed a light on what could possibly be happening to cause > > calls to this function to be so frequent. Here is the profiling > > result: > > > > 13.72% mitscriptbc libc.so.6 [.] ____wcstold_l_internal > > 5.45% mitscriptbc libc.so.6 [.] ____wcstof_l_internal > > 2.46% mitscriptbc libc.so.6 [.] round_and_return > > 2.28% mitscriptbc libc.so.6 [.] ____wcstod_l_internal > > > > The libc version being used is 2.35. I've noticed on ubuntu 22.04 (2.35 as well) `__wcstold_l` is showing up in perf profiles incorrectly. It's usually malloc / memcpy / whatever other functions are usually hot if you look at the asm. Not sure where the bug is but don't think `__wcstold` is whats taking up all those cycles. > > The external name is wcstold or wcstold_l. If your application isn't > calling that, the profiling data is wrong. You might find out by > setting a breakpoint or probe on the function. > > Thanks, > Florian >