I'll test it soon, though visual inspection says this will work.

If it'll help I have no problem pushing this.

On Thu, Mar 28, 2013 at 10:32 PM, Paul Rosenfeld <[email protected]>wrote:

> Hello all,
>
> I'm trying to improve the checkpoint/run scripts and one of the big
> sticking points is figuring out how many cores the current binary is built
> with (I want to annotate the checkpoint names with this value so there's no
> confusion). I've come up with a very crude but effective hack and I was
> wondering if you guys are OK with it. Just print the static string in the
> banner message:
>
> diff --git a/ptlsim/sim/ptlsim.cpp b/ptlsim/sim/ptlsim.cpp
> index ee0de41..307fa2b 100644
> --- a/ptlsim/sim/ptlsim.cpp
> +++ b/ptlsim/sim/ptlsim.cpp
> @@ -386,6 +386,7 @@ static void print_banner(ostream& os) {
>    os << "//  Git branch '", stringify(GITBRANCH), "' on date ",
> stringify(GITDATE)," (HEAD: ", stringify(GITCOMMIT), ")", endl;
>    os << "//  Built ", __DATE__, " ", __TIME__, " on ",
> stringify(BUILDHOST), " using gcc-",
>      stringify(__GNUC__), ".", stringify(__GNUC_MINOR__), endl;
> +  os << "//  With " stringify(NUM_SIM_CORES) " simulated cores", endl;
>    os << "//  Running on ", hostinfo.nodename, ".", hostinfo.domainname,
> endl;
>    os << "//  ", endl;
>    os << endl;
>
>
> And then get it back out with the strings command and grep:
>
> $ strings qemu/qemu-system-x86_64 | grep "simulated cores"
> //  With 2 simulated cores
>
> Is this too hacky for you guys? Is there some easier way to accomplish
> this?
> -Paul
>
> _______________________________________________
> http://www.marss86.org
> Marss86-Devel mailing list
> [email protected]
> https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel
>
>
_______________________________________________
http://www.marss86.org
Marss86-Devel mailing list
[email protected]
https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel

Reply via email to