[m5-dev] SCons issues

2009-02-11 Thread nathan binkert
Steve,

I'm primarily writing you because you're the only other serious scons
hacker on the dev team, but I'm including the dev list so everyone can
see what I'm thinking and perhaps comment.  For those of you who don't
really care about the details of scons, you might still find the
attached patch handy as a nice set of utilities for helping you
compile and run m5.

1)  First, I want to create a python package full of helper stuff for
SCons.  The big question is, where should it go?  I can put it in the
top level directory and call it buildlib or something like that.  I'd
really rather not start the directory name with s, c, t, or u since
that will harm tab completion.  I don't put my build directory in the
source directory, so I can imagine that others might even not really
like it to start with b.  Any ideas?  I could also put it in
src/python, but that might be too buried and since it really isn't
part of the source tree, it seems like the wrong place.

2) Do you think that build_opts stuff really helps?  There are really
two things that the build_opts allows you to do.  One is define the
ISA and emulation, and the other is define some other compile time
parameters such as SS_COMPATIBLE_FP or FAST_ALLOC_DEBUG.  In practice,
I think users don't touch this, and developers only use the former to
provide new ISAs on a semi-permanent basis.  If the latter is still
useful, I think we need to separate these two ideas because I think
that the new framework will require things to work a bit differently
so that options can import other options.  e.g., there should be
something called ALPHA, something called SE, and ALPHA_SE should
include both of those.  (This way I can construct the proper scons
environments and simplify the build.)   For the ISA and emulation
parameters specifically, I expect to use something a bit more pythonic
remove them from the SCons options entirely.  I'd probably just have a
subpackage in buildlib that describes the various ISA/Emulation
options, so there will be simple files that developers can modify as
we work with more ISAs.  Once I do this, I wonder if build_opts is
really beneficial.  If it is, it could be applied to a whole build
directory with a command line parameter instead of being part of the
build directory name.  This would fit in with the stuff I've written
below.

3) right now, we parse the scons command line arguments quite a bit to
figure out what to build and where to build it. For example, if we're
not using the normal build directory, we parse the target to figure
out where the build directory is.  This would allow us specify several
different build locations at once build1/build/ALPHA_FS,
build2/build/ALPHA_SE.  In practice, I see no utility in this.  I
suspect that we would continue to want to specify which binary to
build and thus parse that part of the command line.  For the where to
build part,  I just add a command line parameter -D perhaps that
specifies where the build should go?  This would shorten command lines
quite a bit.

4)  The previous question gets into a utility that I wrote for myself
(attached) that greatly simplifies building and running m5 by helping
you build the right command lines.  I can contribute these as-is, but
I'd actually prefer to move much of the functionality directly into
scons.  This would result in a scons command looking like:
scons -D my build dir --isas=alpha,sparc
--emulations=fullsys,syscall --regression=quick, instead of the crazy
command lines that we have right now (I will continue to support the
crazy command lines because that is inherently how scons works).
A big part (for me at least) of m5build and m5run is that they allow
you to label source tree, build directory pairs with labels and you
can build or run a labeled directory from anywhere.  Much of this
can't really live in the SConstruct file because it's really used to
locate the sconstruct file itself.


I know this is a lot, but I'd love to hear your thoughts.

  Nate
build: Add utilities for helping you build scons command lines and run m5.
The m5build script does two things, it helps you build m5 in any build
directory from any directory.  The second thing it does is simplify the
construction of the scons command line.  For example, you can say
% m5build --all work
This will construct a scons command line that will use your work tree
and build all variants of the code.  (These things are configurable and
there is help information in the files.)

The m5run script simplifies building m5 command lines in that you can
say something like:
% m5run -g work m5 options
This will go and find the debug binary for the work tree and run it under
gdb passing the m5 options that you specified.

diff -r 5645632d594c util/build/dotm5.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +
+++ b/util/build/dotm5.py	Wed Feb 11 12:51:40 2009 -0800
@@ -0,0 +1,48 @@
+# Copyright (c) 2006-2009 The Hewlett-Packard Development Company
+# All rights reserved.
+#
+# Redistribution and use in 

Re: [m5-dev] I can't contribute to x86 M5 right now

2009-02-11 Thread Steve Reinhardt
I don't get a holiday Monday... bummer.  I'm free pretty much all day
though.  I'm also free Tue afternoon and Wed afternoon exc. 2:30-3.  Tue/Wed
evenings are bad for me.

Steve

On Wed, Feb 11, 2009 at 5:40 PM, nathan binkert n...@binkert.org wrote:

 Hi everybody. I can't contribute to M5's x86 support right now
  because I'm still blocked on supporting TLB misses correctly. Until
  that's dealt with, all of my patches will stay in my queue behind it and
  none of them will make it into the head. If Nate, Steve, etc. could
  please help figure out concretely what to do here that would be greatly
  appreciated. I'll be most available early next week so I'd like to have
  a phone meeting around then. Lets make some arrangements.

 Monday is a holiday (though I could do a phone call), I'm available in
 the afternoon/evening Tue/Wed.  Steve?

  Nate
 ___
 m5-dev mailing list
 m5-dev@m5sim.org
 http://m5sim.org/mailman/listinfo/m5-dev

___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev


Re: [m5-dev] [PATCH] [mq]: switchtotimingsimplecpu.diff

2009-02-11 Thread nathan binkert
I'm cleaning out my inbox and I was wondering if this ever got resolved.  David?

It would be nice to see this whole interface cleaned up (across all
CPUs), so if anyone understands what's going on here, I'd appreciate
some info.

  Nate

On Wed, Jan 7, 2009 at 8:09 AM, Clint Smullen cw...@cs.virginia.edu wrote:
 This patch is unrelated to switching back from detailedd. I have still
 not finished fixing everything (and, when I get a chance, I need to
 post some questions about it).

 I'm not sure why this patch is needed, since in takeOverFrom, at that
 point, _status is set to Running. Then, later on, when resume is
 called, since _status is Running, schedule is called. The only thing I
 could think of that would mess up that process would be if the status
 changed again before resume got called. If that was occurring, then
 that should probably be fixed instead of calling the schedule early.

 I could not locate any discussion context related to this patch, but I
 did ask a related question some time back (see Switching back to
 already used CPUs). I was able to work around the problem by using
 fresh processors every time, but that is, of course, not a general
 solution.

- Clint

 On Jan 6, 2009, at 6:02 PM, nathan binkert wrote:

 I feel like I'm missing some context with this patch (though I will
 admit to not following the mailing list very closely after the last
 few months.  Was this the solution to us not being able to switch back
 to timing from detailed?  Can you write up a commit message?

 At first glance, it seems correct.  I'll just double check, and when I
 get your commit message, I'll apply it.

 Thanks for the patch!

  Nate



 On Mon, Jan 5, 2009 at 12:16 AM, David A. Ramos dtrum...@umich.edu
 wrote:
 # HG changeset patch
 # User David Ramos dtrum...@umich.edu
 # Date 1231142438 18000
 # Node ID 122cc03013a106e722593bee490d4b8210c623a4
 # Parent  50c9d48de3caa629a27408bf5f3423656ae15da1
 [mq]: switchtotimingsimplecpu.diff

 diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc
 --- a/src/cpu/simple/timing.cc
 +++ b/src/cpu/simple/timing.cc
 @@ -194,6 +194,7 @@
ThreadContext *tc = threadContexts[i];
if (tc-status() == ThreadContext::Active  _status !=
 Running) {
_status = Running;
 +schedule(fetchEvent, nextCycle());
break;
}
}
 ___
 m5-dev mailing list
 m5-dev@m5sim.org
 http://m5sim.org/mailman/listinfo/m5-dev


 ___
 m5-dev mailing list
 m5-dev@m5sim.org
 http://m5sim.org/mailman/listinfo/m5-dev

 ___
 m5-dev mailing list
 m5-dev@m5sim.org
 http://m5sim.org/mailman/listinfo/m5-dev


___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev


[m5-dev] Cron m5t...@zizzer /z/m5/regression/do-regression quick

2009-02-11 Thread Cron Daemon

See /z/m5/regression/regress-2009-02-12-03:00:01 for details.

___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev