Simulation.py (5072:ff0e3c84a1de) Simulation.py (5073:1916291dcfda)
1# Copyright (c) 2006-2007 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 116 unchanged lines hidden (view full) ---

125 from os.path import isdir
126 from os import listdir
127 import re
128
129 if not isdir(cptdir):
130 m5.panic("checkpoint dir %s does not exist!" % cptdir)
131
132 dirs = listdir(cptdir)
1# Copyright (c) 2006-2007 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 116 unchanged lines hidden (view full) ---

125 from os.path import isdir
126 from os import listdir
127 import re
128
129 if not isdir(cptdir):
130 m5.panic("checkpoint dir %s does not exist!" % cptdir)
131
132 dirs = listdir(cptdir)
133 expr = re.compile('cpt.([0-9]*)')
133 expr = re.compile('cpt\.([0-9]*)')
134 cpts = []
135 for dir in dirs:
136 match = expr.match(dir)
137 if match:
138 cpts.append(match.group(1))
139
140 cpts.sort(lambda a,b: cmp(long(a), long(b)))
141

--- 88 unchanged lines hidden ---
134 cpts = []
135 for dir in dirs:
136 match = expr.match(dir)
137 if match:
138 cpts.append(match.group(1))
139
140 cpts.sort(lambda a,b: cmp(long(a), long(b)))
141

--- 88 unchanged lines hidden ---