Skip to content

Commit 9b4754e

Browse files
committed
Clarify --cpu-mask option values
Clarify that the --cpu-mask option reads values from left to right and modify the example in the description so it's clearer.
1 parent 73d8eac commit 9b4754e

File tree

5 files changed

+15
-12
lines changed

5 files changed

+15
-12
lines changed

USAGE_android.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -759,9 +759,10 @@ optional arguments:
759759
by <file>
760760
--cpu-mask <binary-mask>
761761
Set of CPU cores used by the replayer.
762-
`binary-mask` is a succession of '0' and '1' that specifies
763-
used/unused cores. For example '1010' activates the first and
764-
third cores and deactivate all other cores.
762+
`binary-mask` is a succession of '0' and '1' read from left
763+
to right that specifies used/unused cores.
764+
For example '10010' activates the first and
765+
fourth cores and deactivate all other cores.
765766
If the option is not set, all cores can be used. If the option
766767
is set only for some cores, the other cores are not used.
767768
--screenshot-all

USAGE_desktop_D3D12.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,10 @@ Optional arguments:
273273
Direct3D 12 capture.
274274
--cpu-mask <binary-mask>
275275
Set of CPU cores used by the replayer.
276-
`binary-mask` is a succession of '0' and '1' that specifies
277-
used/unused cores. For example '1010' activates the first and
278-
third cores and deactivate all other cores.
276+
`binary-mask` is a succession of '0' and '1' read from left
277+
to right that specifies used/unused cores.
278+
For example '10010' activates the first and
279+
fourth cores and deactivate all other cores.
279280
If the option is not set, all cores can be used. If the option
280281
is set only for some cores, the other cores are not used.
281282
--gpu <index> Use the specified device for replay, where index

USAGE_desktop_Vulkan.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -593,9 +593,10 @@ Optional arguments:
593593
--log-debugview Log messages with OutputDebugStringA. Windows only.
594594
--cpu-mask <binary-mask>
595595
Set of CPU cores used by the replayer.
596-
`binary-mask` is a succession of '0' and '1' that specifies
597-
used/unused cores. For example '1010' activates the first and
598-
third cores and deactivate all other cores.
596+
`binary-mask` is a succession of '0' and '1' read from left
597+
to right that specifies used/unused cores.
598+
For example '10010' activates the first and
599+
fourth cores and deactivate all other cores.
599600
If the option is not set, all cores can be used. If the option
600601
is set only for some cores, the other cores are not used.
601602
--gpu <index> Use the specified device for replay, where index

android/scripts/gfxrecon.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def CreateReplayParser():
9595
parser.add_argument('--log-file', metavar='DEVICE_FILE', help='Write log messages to a file at the specified path instead of logcat (forwarded to replay tool)')
9696
parser.add_argument('--pause-frame', metavar='N', help='Pause after replaying frame number N (forwarded to replay tool)')
9797
parser.add_argument('--paused', action='store_true', default=False, help='Pause after replaying the first frame (same as "--pause-frame 1"; forwarded to replay tool)')
98-
parser.add_argument('--cpu-mask', metavar='binary_mask', help='Set of CPU cores used by the replayer. `binary-mask` is a succession of "0" and "1" that specifies used/unused cores. For example "1010" activates the first and third cores and deactivate all other cores. If the option is not set, all cores can be used. If the option is set only for some cores, the other cores are not used. (forwarded to replay tool)')
98+
parser.add_argument('--cpu-mask', metavar='binary_mask', help='Set of CPU cores used by the replayer. `binary-mask` is a succession of "0" and "1" that specifies used/unused cores read from left to right. For example "10010" activates the first and fourth cores and deactivate all other cores. If the option is not set, all cores can be used. If the option is set only for some cores, the other cores are not used. (forwarded to replay tool)')
9999
parser.add_argument('--screenshot-all', action='store_true', default=False, help='Generate screenshots for all frames. When this option is specified, --screenshots is ignored (forwarded to replay tool)')
100100
parser.add_argument('--screenshots', metavar='RANGES', help='Generate screenshots for the specified frames. Target frames are specified as a comma separated list of frame ranges. A frame range can be specified as a single value, to specify a single frame, or as two hyphenated values, to specify the first and last frames to process. Frame ranges should be specified in ascending order and cannot overlap. Note that frame numbering is 1-based (i.e. the first frame is frame 1). Example: 200,301-305 will generate six screenshots (forwarded to replay tool)')
101101
parser.add_argument('--screenshot-format', metavar='FORMAT', choices=['bmp', 'png'], help='Image file format to use for screenshot generation. Available formats are: bmp, png (forwarded to replay tool)')

framework/util/platform.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ inline std::string GetCpuAffinity()
638638
{
639639
affinity.pop_back();
640640
}
641-
#endif
641+
#endif // __linux__
642642

643643
return affinity;
644644
}
@@ -661,7 +661,7 @@ static bool SetCpuAffinity(const std::string& affinity)
661661
}
662662

663663
return (sched_setaffinity(0, sizeof(mask), &mask) == 0);
664-
#else
664+
#else // !__linux__
665665
return false;
666666
#endif
667667
}

0 commit comments

Comments
 (0)