From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CF5BC3858427; Mon, 4 Dec 2023 02:37:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CF5BC3858427 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701657446; bh=EnSWA4KxbGg7pISDLTyOzIolwU4E7PcN8v30Jvzttl0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WU+NwdZfUPwFtLDe9J/JGVkF7q6VGmTkMaoG9Sm4q/Z8YM9HF2+yrKYVnvibMgiqw yqcJq4iTBafkvajgvSkAt2Z7+eNu3lRPDi9Xi9Y8F8Dy9EmA64n4BMZ/4/6hV4wkQl Ofxph50B1GEooMCvRn4TpL2qWa9HZss2rNE2GCaA= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/112829] Dump PGO profiles to a memory buffer Date: Mon, 04 Dec 2023 02:37:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: gcov-profile X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_severity Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112829 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement --- Comment #3 from Andrew Pinski --- GCC does not currently have a way. Though I suspect one of the reasons is t= hat for embedded, folks don't use -fprofile-generate/-fprofile-use that much or they use a simulator which then has direct access to the host machine to generate the files. I Know for Octeon SE (MIPS baremetal interface on the Cavium Octeon) that t= hey had a way to do this using memory dump but it was hooked up outside of gcov= and in newlib instead. I do think this is a good idea for embedded env but I am not sure if anyone= who is interested in doing it. for Linux env, using nfs mount and -fprofile-dir=3D/-fprofile-prefix-map=3D/-fprofile-prefix-path=3D is one wa= y of doing it. Also if you are using Zephyr, it does handle the writes and does the store = to memory and such too. See https://docs.zephyrproject.org/latest/develop/test/coverage.html .=