m5stats2streamline.py (10354:2d6d7a056a38) | m5stats2streamline.py (11686:4a86763c0b30) |
---|---|
1#!/usr/bin/env python 2 3# Copyright (c) 2012, 2014 ARM Limited 4# All rights reserved 5# 6# The license below extends only to copyright in the software and shall 7# not be construed as granting a license to any other intellectual 8# property including but not limited to intellectual property relating --- 128 unchanged lines hidden (view full) --- 137 print "Parsing gem5 config.ini file..." 138 print config_file 139 print "===============================\n" 140 config = ConfigParser() 141 if not config.read(config_file): 142 print "ERROR: config file '", config_file, "' not found" 143 sys.exit(1) 144 | 1#!/usr/bin/env python 2 3# Copyright (c) 2012, 2014 ARM Limited 4# All rights reserved 5# 6# The license below extends only to copyright in the software and shall 7# not be construed as granting a license to any other intellectual 8# property including but not limited to intellectual property relating --- 128 unchanged lines hidden (view full) --- 137 print "Parsing gem5 config.ini file..." 138 print config_file 139 print "===============================\n" 140 config = ConfigParser() 141 if not config.read(config_file): 142 print "ERROR: config file '", config_file, "' not found" 143 sys.exit(1) 144 |
145 if config.has_section("system.cluster.cpu"): | 145 if config.has_section("system.cpu"): |
146 num_cpus = 1 147 else: 148 num_cpus = 0 | 146 num_cpus = 1 147 else: 148 num_cpus = 0 |
149 while config.has_section("system.cluster.cpu" + str(num_cpus)): | 149 while config.has_section("system.cpu" + str(num_cpus)): |
150 num_cpus += 1 151 | 150 num_cpus += 1 151 |
152 if config.has_section("system.cluster.l2_cache"): | 152 if config.has_section("system.l2_cache"): |
153 num_l2 = 1 154 else: 155 num_l2 = 0 | 153 num_l2 = 1 154 else: 155 num_l2 = 0 |
156 while config.has_section("system.cluster.l2_cache" + str(num_l2)): | 156 while config.has_section("system.l2_cache" + str(num_l2)): |
157 num_l2 += 1 158 159 print "Num CPUs:", num_cpus 160 print "Num L2s:", num_l2 161 print "" 162 163 return (num_cpus, num_l2) 164 --- 1087 unchanged lines hidden --- | 157 num_l2 += 1 158 159 print "Num CPUs:", num_cpus 160 print "Num L2s:", num_l2 161 print "" 162 163 return (num_cpus, num_l2) 164 --- 1087 unchanged lines hidden --- |