Changeset 286562 in webkit
- Timestamp:
- Dec 6, 2021, 1:01:35 PM (5 years ago)
- Location:
- trunk/PerformanceTests
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
JetStream2/RAMification.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PerformanceTests/ChangeLog
r286108 r286562 1 2021-12-06 Zan Dobersek <zdobersek@igalia.com> 2 3 [RAMification] Add support for dumping smaps rollups on Linux 4 https://bugs.webkit.org/show_bug.cgi?id=233867 5 6 Reviewed by Yusuke Suzuki. 7 8 Add the option to dump smaps rollup after the end of each RAMification 9 test case. This mirrors the vmmap functionality and is implemented 10 alongside that option. 11 12 Once the jsc binary is left idle after the test case run, the 13 smaps_rollup output for the given jsc process is collected from the 14 proc filesystem. This material is then printed out after the test 15 is done, following the memory footprint dump. 16 17 For now this prefers the smaps_rollup instead of the complete smaps. 18 In this form, it already gives a good insight into the balance between 19 the proportional and residential set size amounts. Complete smaps could 20 be beneficial later, especially if we can implement differentiation 21 between allocations of different types and/or purposes. 22 23 * JetStream2/RAMification.py: 24 (parseArgs): 25 (BaseRunner.__init__): 26 (BaseRunner.getResults): 27 (LocalRunner.runOneTest): 28 (main): 29 (main.runTestList): 30 1 31 2021-11-21 Cathie Chen <cathiechen@igalia.com> 2 32 -
trunk/PerformanceTests/JetStream2/RAMification.py
r277853 r286562 44 44 peakFootprintRE = re.compile(r"Peak Footprint: (\d+(?:.\d+)?)") 45 45 46 TestResult = collections.namedtuple("TestResult", ["name", "returnCode", "footprint", "peakFootprint", "vmmapOutput" ])46 TestResult = collections.namedtuple("TestResult", ["name", "returnCode", "footprint", "peakFootprint", "vmmapOutput", "smapsOutput"]) 47 47 48 48 ramification_dir = os.path.abspath(os.path.dirname(os.path.realpath(__file__))) … … 122 122 parser.add_argument("-o", "--output", dest="jsonFilename", type=str, default=None, metavar="JSON-output-file", help="Path to JSON output") 123 123 parser.add_argument("-m", "--vmmap", dest="takeVmmap", action="store_true", default=False, help="Take a vmmap after each test") 124 parser.add_argument("--smaps", dest="takeSmaps", action="store_true", default=False, help="Take a smaps rollup after each test") 124 125 125 126 args = parser.parse_args() … … 148 149 self.rootDir = args.testDir 149 150 self.environmentVars = {} 150 self.vmmapOutput = "" 151 self.vmmapOutput = "" if args.takeVmmap else None 152 self.smapsOutput = "" if args.takeSmaps else None 151 153 152 154 def setup(self): … … 181 183 182 184 def getResults(self): 183 return TestResult(name=self.testName, returnCode=self.returnCode, footprint=self.footprint, peakFootprint=self.peakFootprint, vmmapOutput=self.vmmapOutput )185 return TestResult(name=self.testName, returnCode=self.returnCode, footprint=self.footprint, peakFootprint=self.peakFootprint, vmmapOutput=self.vmmapOutput, smapsOutput=self.smapsOutput) 184 186 185 187 … … 212 214 213 215 if "js shell waiting for input to exit" in line: 214 self.vmmapOutput = subprocess.Popen(['vmmap', '--summary', '{}'.format(proc.pid)], shell=False, stderr=subprocess.PIPE, stdout=subprocess.PIPE).stdout.read() 215 if sys.version_info[0] >= 3: 216 self.vmmapOutput = str(self.vmmapOutput, "utf-8") 216 if self.vmmapOutput is not None: 217 self.vmmapOutput = subprocess.Popen(['vmmap', '--summary', '{}'.format(proc.pid)], shell=False, stderr=subprocess.PIPE, stdout=subprocess.PIPE).stdout.read() 218 if sys.version_info[0] >= 3: 219 self.vmmapOutput = str(self.vmmapOutput, "utf-8") 220 if self.smapsOutput is not None: 221 self.smapsOutput = subprocess.Popen(['cat', '/proc/{}/smaps_rollup'.format(proc.pid)], shell=False, stderr=subprocess.PIPE, stdout=subprocess.PIPE).stdout.read() 217 222 proc.stdin.write(b"done\n") 218 223 proc.stdin.flush() … … 236 241 testRunner = args.runner(args) 237 242 238 239 if args.takeVmmap: 243 if args.takeVmmap or args.takeSmaps: 240 244 testRunner.setEnv("JS_SHELL_WAIT_FOR_INPUT_TO_EXIT", "1") 241 245 … … 271 275 if testResult.vmmapOutput: 272 276 print(testResult.vmmapOutput) 277 if testResult.smapsOutput: 278 print(testResult.smapsOutput) 273 279 else: 274 280 print
Note:
See TracChangeset
for help on using the changeset viewer.