Previously the .pseudoprobe data section of a function was supposed to be placed in its own comdat group so that it can de deduplicated against same-named data (such as weak symbols). Unfortunately a bug in the group name setting blocked such, therefore probes for different copies of the same function were not deduplicated and duplicated probes were reported for the final binary code.
Fixing the bug should unblock the deduplication. However, it may cause another issue where the final function code and the probe data are mismatched, because the code and the probes are deduplicated independently. I'm fixing this be placing the probes in the same comdat group as the code so that they can be deduplicated synchronously.
As an example below, with the current change we have section layout :
COMDAT group section [ 3] `.group' [foo] contains 3 sections: [Index] Name [ 4] .text.foo [ 5] .rela.text.foo [ 17] .pseudo_probe.foo COMDAT group section [ 6] `.group' [foo2] contains 3 sections: [Index] Name [ 7] .text.foo2 [ 8] .rela.text.foo2 [ 18] .pseudo_probe.foo2 COMDAT group section [ 10] `.group' [.pseudo_probe_desc_foo] contains 1 sections: [Index] Name [ 11] .pseudo_probe_desc COMDAT group section [ 12] `.group' [.pseudo_probe_desc_foo2] contains 1 sections: [Index] Name [ 13] .pseudo_probe_desc
Note that the probe desc data are still placed in separate groups because they are not bound to the final code unlike the probe data. Once a function is inlined, its probe data are included in the caller's probe data, but its probe desc is still there in separate. The probe descs do not need to be deduplicated with the code together.
Test Plan: