Commit 243630d
Expand %p in X87_PROFILE and X87_SAMPLE to the attached process pid
In cooperative mode Wine re-executes every 32-bit process through the
sidecar, so one game launch is several sidecars: the wineboot helpers,
the process that starts the game, and the game itself, all inheriting
the same X87_PROFILE. The last sidecar to open the path wins, and since
the block profiler appends its counter section only after its target
exits, the game's profile was routinely truncated by a helper's before
it could be finalised. profile_analyze then rejected it as incomplete,
with no way to tell which process the surviving file belonged to.
Expand %p against the pid behind the task port the sidecar received,
for both X87_PROFILE and X87_SAMPLE, before any old output is unlinked
or a new file opened. Without %p the paths behave as before. If the
target pid cannot be resolved the profiler is disabled with a message
rather than writing under the wrong name.
Verified under wine-cx-26.3.0-1 on an M2 Max, macOS 26.5, with a
32-bit Direct3D game: one launch produced x87-block-<pid>.prof for each
of four cooperative sidecars, and the game's file carried a complete
counter section that profile_analyze accepted (2197 blocks).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>1 parent 4e9c738 commit 243630d
2 files changed
Lines changed: 50 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
205 | 209 | | |
206 | 210 | | |
207 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2902 | 2902 | | |
2903 | 2903 | | |
2904 | 2904 | | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
2905 | 2930 | | |
2906 | 2931 | | |
2907 | | - | |
2908 | | - | |
| 2932 | + | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
2909 | 2939 | | |
2910 | | - | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
| 2943 | + | |
2911 | 2944 | | |
2912 | | - | |
| 2945 | + | |
| 2946 | + | |
2913 | 2947 | | |
2914 | 2948 | | |
2915 | 2949 | | |
| |||
3026 | 3060 | | |
3027 | 3061 | | |
3028 | 3062 | | |
| 3063 | + | |
| 3064 | + | |
| 3065 | + | |
| 3066 | + | |
| 3067 | + | |
| 3068 | + | |
| 3069 | + | |
3029 | 3070 | | |
3030 | 3071 | | |
3031 | 3072 | | |
| |||
3037 | 3078 | | |
3038 | 3079 | | |
3039 | 3080 | | |
3040 | | - | |
3041 | | - | |
3042 | | - | |
3043 | | - | |
3044 | | - | |
3045 | 3081 | | |
3046 | 3082 | | |
3047 | 3083 | | |
| |||
0 commit comments