Hi Fulya,

The m5-mcpat.pl and mcpat-template.xml on the website
https://www.cl.cam.ac.uk/~acr31/sicsa/ work for me with some modification.

 1. First, you should make sure the all the value field in the
mcpat-template.xml can be found in the stats.txt or config.ini files.
Otherwise, modify them according to these two files generated by Gem5.

For example:
change <stat name="memory_reads" value="{stats.system.l2.ReadReq_misses}"/>

to <stat name="memory_reads"
value="{stats.system.l2.ReadReq_misses::total}"/>

Because we can not find ReadReq_misses in stats.txt. Instead, there is
ReadReq_misses::total in the stats.txt.


2. The other thing is to modify m5-mcpat.pl to deal with *nan* and *inf* in
stats.txt. Otherwise, there will be error like:  Failed to parse stats
system.physmem.writeRowHitRate                    nan

The perl file is pretty easy to understand and modify.

change :

sub loadStats() {
    my ($result,$file) = ({},@_);
    open(WORKING,"<$file") or die "Failed to open stats file $file\n";
    while(my $line = <WORKING>) {
        chomp($line);
        if ($line =~ /^(\S+)\s+([\d\.\-]+|no_value)\s/) {
            $result->{$1} = $2;
        }

to:

sub loadStats() {
    my ($result,$file) = ({},@_);
    open(WORKING,"<$file") or die "Failed to open stats file $file\n";
    while(my $line = <WORKING>) {
        chomp($line);
        if ($line =~ /^(\S+)\s+([\d\.\-]+*|non|inf*)\s/) {
            $result->{$1} = $2;
        }

Also, if you want to set the fields that do not have value in the
stats file to Zero.

You could change:

    if ($r eq "") {
        print STDERR "Warning: empty result for $f\n";
    }
    return eval $e;

to

    if ($r eq "") {
        print STDERR "Warning: empty result for $f\n";

        *$e = 0*

     }
    return eval $e;



Hope that helps.

Best!




On Mon, Jul 15, 2013 at 10:18 PM, fulya <[email protected]> wrote:

> Hi all,
> I am using gem5-stable-07352f119e48 (most recent stable version) and
> running Parsec benchmarks on X86. I am trying to integrate it with McPat. I
> read somewhere that the newly added config.json file solves the previously
> encountered parsing problems. Is that true or what is the best way to do it?
> I am pretty new at gem5 and do not have any experience with pearl (there
> is also a pearl script doing a similar conversion but it is said to require
> some modification as well). Are there any sources explaining the use of
> config.json file or any other way of integrating McPat to gem5? Please help
> me.
>
> Best,
> Fulya Kaplan
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to