(self, args)
| 907 | |
| 908 | class DesktopPlatform(Platform): |
| 909 | def __init__(self, args): |
| 910 | super(DesktopPlatform, self).__init__(args) |
| 911 | self.command_prefix = [] |
| 912 | |
| 913 | # Setup command class to OS specific version. |
| 914 | command.setup(utils.GuessOS(), args.device) |
| 915 | |
| 916 | if args.prioritize or args.affinitize is not None: |
| 917 | self.command_prefix = ['schedtool'] |
| 918 | if args.prioritize: |
| 919 | self.command_prefix += ['-n', '-20'] |
| 920 | if args.affinitize is not None: |
| 921 | # schedtool expects a bit pattern when setting affinity, where each |
| 922 | # bit set to '1' corresponds to a core where the process may run on. |
| 923 | # First bit corresponds to CPU 0. Since the 'affinitize' parameter is |
| 924 | # a core number, we need to map to said bit pattern. |
| 925 | cpu = int(args.affinitize) |
| 926 | core = 1 << cpu |
| 927 | self.command_prefix += ['-a', ('0x%x' % core)] |
| 928 | self.command_prefix += ['-e'] |
| 929 | |
| 930 | if args.checked_warmup: |
| 931 | self.warmup_manager = CachedWarmupManager() |
| 932 | |
| 933 | def PreExecution(self): |
| 934 | pass |
nothing calls this directly
no test coverage detected