Commit a56bdd10 authored by Andreas Zwinkau's avatar Andreas Zwinkau
Browse files

Use procinfo in sparc64

parent 9b91e315
......@@ -357,8 +357,8 @@ def generate_spec_config(options):
contents.append("sw_base_ptrsize = %d-bit" % BITSIZE)
contents.append("sw_peak_ptrsize = %d-bit" % BITSIZE)
contents.append("")
chips = (1+int(cpuinfo["processor"]))
cores_per_chip = int(cpuinfo["cpu cores"])
chips = (1+int(cpuinfo.get("processor", 0)))
cores_per_chip = int(cpuinfo.get("cpu cores", cpuinfo.get("cpu cores", 1)))
cores = cores_per_chip * chips
if SPEC_SUITE == "SPEC CPU2006":
contents.append("hw_cpu_name = %s" % cpuinfo["model name"])
......@@ -366,12 +366,12 @@ def generate_spec_config(options):
elif SPEC_SUITE == "SPEC CPU2000":
contents.append("hw_model = %s" % cpuinfo["model name"])
contents.append("hw_ncpu = %d" % cores)
contents.append("hw_cpu_mhz = %s" % cpuinfo["cpu MHz"])
contents.append("hw_cpu_mhz = %s" % cpuinfo.get("cpu MHz", "?"))
contents.append("hw_nchips = %d" % chips)
contents.append("hw_ncoresperchip = %d" % cores_per_chip)
contents.append("hw_vendor = %s" % cpuinfo["vendor_id"])
contents.append("hw_vendor = %s" % cpuinfo.get("vendor_id", "?"))
contents.append("hw_memory = %s" % meminfo["MemTotal"])
contents.append("hw_pcache = %s" % cpuinfo["cache size"])
contents.append("hw_pcache = %s" % cpuinfo.get("cache size", "?"))
contents.append("")
contents.append("CC = %s" % options.c_compiler)
contents.append("CXX = %s" % options.cpp_compiler)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment