<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in inline-cs-pseudoprobe.perfbin</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>bd524955 - [CSSPGO] Undoing the concept of dangling pseudo probe</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/llvm/test/tools/llvm-profgen/Inputs/inline-cs-pseudoprobe.perfbin#bd524955</link>
        <description>[CSSPGO] Undoing the concept of dangling pseudo probeAs a follow-up to https://reviews.llvm.org/D104129, I&apos;m cleaning up the danling probe related code in both the compiler and llvm-profgen.I&apos;m seeing a 5% size win for the pseudo_probe section for SPEC2017 and 10% for Ciner. Certain benchmark such as 602.gcc has a 20% size win. No obvious difference seen on build time for SPEC2017 and Cinder.Reviewed By: wenleiDifferential Revision: https://reviews.llvm.org/D104477

            List of files:
            /llvm-project-15.0.7/llvm/test/tools/llvm-profgen/Inputs/inline-cs-pseudoprobe.perfbin</description>
        <pubDate>Thu, 17 Jun 2021 18:09:13 +0000</pubDate>
        <dc:creator>Hongtao Yu &lt;hoy@fb.com&gt;</dc:creator>
    </item>
<item>
        <title>b3154d11 - [CSSPGO][llvm-profgen] Pseudo probe decoding and disassembling</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/llvm/test/tools/llvm-profgen/Inputs/inline-cs-pseudoprobe.perfbin#b3154d11</link>
        <description>[CSSPGO][llvm-profgen] Pseudo probe decoding and disassemblingThis change implements pseudo probe decoding and disassembling for llvm-profgen/CSSPGO. Please see https://groups.google.com/g/llvm-dev/c/1p1rdYbL93s and https://reviews.llvm.org/D89707 for more context about CSSPGO and llvm-profgen.**ELF section format**Please see the encoding patch(https://reviews.llvm.org/D91878) for more details of the format, just copy the example here:Two section(`.pseudo_probe_desc`&#160;and &#160;`.pseudoprobe`&#160;) is emitted in ELF to support pseudo probe.The format of&#160;`.pseudo_probe_desc`&#160;section looks like:```.section   .pseudo_probe_desc,&quot;&quot;,@progbits.quad   6309742469962978389  // Func GUID.quad   4294967295           // Func Hash.byte   9                    // Length of func name.ascii  &quot;_Z5funcAi&quot;          // Func name.quad   7102633082150537521.quad   138828622701.byte   12.ascii  &quot;_Z8funcLeafi&quot;.quad   446061515086924981.quad   4294967295.byte   9.ascii  &quot;_Z5funcBi&quot;.quad   -2016976694713209516.quad   72617220756.byte   7.ascii  &quot;_Z3fibi&quot;```For each&#160;`.pseudoprobe`&#160;section, the encoded binary data consists of a single function record corresponding to an outlined function (i.e, a function with a code entry in the&#160;`.text`&#160;section). A function record has the following format :```FUNCTION BODY (one for each outlined function present in the text section)    GUID (uint64)        GUID of the function    NPROBES (ULEB128)        Number of probes originating from this function.    NUM_INLINED_FUNCTIONS (ULEB128)        Number of callees inlined into this function, aka number of        first-level inlinees    PROBE RECORDS        A list of NPROBES entries. Each entry contains:          INDEX (ULEB128)          TYPE (uint4)            0 - block probe, 1 - indirect call, 2 - direct call          ATTRIBUTE (uint3)            reserved          ADDRESS_TYPE (uint1)            0 - code address, 1 - address delta          CODE_ADDRESS (uint64 or ULEB128)            code address or address delta, depending on ADDRESS_TYPE    INLINED FUNCTION RECORDS        A list of NUM_INLINED_FUNCTIONS entries describing each of the inlined        callees.  Each record contains:          INLINE SITE            GUID of the inlinee (uint64)            ID of the callsite probe (ULEB128)          FUNCTION BODY            A FUNCTION BODY entry describing the inlined function.```**Disassembling**A switch `--show-pseudo-probe` is added to use along with `--show-disassembly` to print disassembly code with pseudo probe directives.For example:```00000000002011a0 &lt;foo2&gt;:  2011a0: 50                    push   rax  2011a1: 85 ff                 test   edi,edi  [Probe]:  FUNC: foo2  Index: 1  Type: Block  2011a3: 74 02                 je     2011a7 &lt;foo2+0x7&gt;  [Probe]:  FUNC: foo2  Index: 3  Type: Block  [Probe]:  FUNC: foo2  Index: 4  Type: Block  [Probe]:  FUNC: foo   Index: 1  Type: Block  Inlined: @ foo2:6  2011a5: 58                    pop    rax  2011a6: c3                    ret  [Probe]:  FUNC: foo2  Index: 2  Type: Block  2011a7: bf 01 00 00 00        mov    edi,0x1  [Probe]:  FUNC: foo2  Index: 5  Type: IndirectCall  2011ac: ff d6                 call   rsi  [Probe]:  FUNC: foo2  Index: 4  Type: Block  2011ae: 58                    pop    rax  2011af: c3                    ret```**Implementation**- `PseudoProbeDecoder` is added in ProfiledBinary as an infra for the decoding. It decoded the two section and generate two map: `GUIDProbeFunctionMap` stores all the `PseudoProbeFunction` which is the abstraction of a general function. `AddressProbesMap` stores all the pseudo probe info indexed by its address.- All the inline info is encoded into binary as a trie(`PseudoProbeInlineTree`) and will be constructed from the decoding. Each pseudo probe can get its inline context(`getInlineContext`) by traversing its inline tree node backwards.Test Plan:ninja &amp; ninja check-llvmDifferential Revision: https://reviews.llvm.org/D92334

            List of files:
            /llvm-project-15.0.7/llvm/test/tools/llvm-profgen/Inputs/inline-cs-pseudoprobe.perfbin</description>
        <pubDate>Tue, 24 Nov 2020 04:33:23 +0000</pubDate>
        <dc:creator>wlei &lt;wlei@fb.com&gt;</dc:creator>
    </item>
</channel>
</rss>
