From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7D22F3858C53; Sun, 3 Dec 2023 05:58:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7D22F3858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701583125; bh=tDHhQyAor16Twf55y+XnDIoCSdROCBcvOBhmTiaAz64=; h=From:To:Subject:Date:From; b=sUGpmPY5eReCfGifssnuW5rTj/OBDevfN2K8Bt4iJvFB/ClAWfpVF8Qs3b3S/iUFe MujTOqFpt1tSBKxRBu+X/eCVOfnPB4u7NyfSxi8UV7u8YdFYw+0T+SsudSR6Q8b+5J MFOXLxf6Uwx41f4imJHn/LkY6FHz66Z+nEMCVrOI= From: "zamazan4ik at tut dot by" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/112829] New: Dump PGO profiles to a memory buffer Date: Sun, 03 Dec 2023 05:58:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: gcov-profile X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: zamazan4ik at tut dot by 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_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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 Bug ID: 112829 Summary: Dump PGO profiles to a memory buffer Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: gcov-profile Assignee: unassigned at gcc dot gnu.org Reporter: zamazan4ik at tut dot by CC: marxin at gcc dot gnu.org Target Milestone: --- According to the GCC documentation (https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html) the only option is to dump PGO profiles to a filesystem. I am looking for an option = to dump PGO profiles into a memory buffer. LLVM infrastructure has such an abi= lity - it's documented here: https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#using-the-profilin= g-runtime-without-a-filesystem . If GCC has such an ability too - would be great if it would be described somewhere in the Instrumentation documentation (or in any other better plac= e in your opinion). The use case for having this is simple - in some systems, a filesystem can = be read-only (e.g. due to security concerns) or even not enough to handle the = PGO profile. With the memory approach, we will be able to collect PGO profiles = and then deliver and expose them via other interfaces like HTTP or MQTT. I guess some related information can be found here (https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dblob;f=3Dlibgcc/libgcov-profiler.= c) but I am not sure.=