d0b6916bb5ec4b00a80825113b87508dcb8e8cfa
2 * Copyright (c) 2003-2004 The Regents of The University of Michigan
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
9 * redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution;
12 * neither the name of the copyright holders nor the names of its
13 * contributors may be used to endorse or promote products derived from
14 * this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 #include "base/cprintf.hh"
36 #include "base/misc.hh"
37 #include "base/statistics.hh"
38 #include "base/stats/text.hh"
39 #include "base/stats/python.hh"
40 #include "base/stats/mysql.hh"
41 #include "sim/host.hh"
44 using namespace Stats
;
47 Tick ticksPerSecond
= ULL(2000000000);
54 Distribution
<MainBin
> s6
;
57 StandardDeviation
<> s9
;
58 AverageDeviation
<> s10
;
61 VectorDistribution
<> s13
;
62 VectorStandardDeviation
<> s14
;
63 VectorAverageDeviation
<> s15
;
77 ostream
*outputStream
= &cout
;
87 double operator()() { return 9.7; }
95 panic("incorrect usage.\n"
97 "\t%s [-p <python file>] [-t [-c] [-d]]\n", progname
);
101 main(int argc
, char *argv
[])
103 bool descriptions
= false;
109 string mysql_user
= "binkertn";
114 while ((c
= getopt(argc
, argv
, "cdh:P:p:s:tu:")) != -1) {
126 mysql_passwd
= optarg
;
145 if (!text
&& (compat
|| descriptions
))
152 s12
.init(1, 100, 13);
153 s13
.init(4, 0, 99, 10);
160 .desc("this is statistic 1")
165 .desc("this is statistic 2")
171 .desc("this is statistic 3")
177 .desc("this is statistic 4")
183 .desc("this is statistic 5")
194 .desc("this is statistic 6")
200 .desc("this is statistic 7")
208 .desc("this is statistic 8")
216 .desc("this is statistic 9")
223 .desc("this is statistic 10")
229 .desc("this is statistic 12")
234 .desc("this is statistic 13")
239 .desc("this is statistic 14")
244 .desc("this is statistic 15")
249 .desc("this is statistic 16")
259 .desc("this is formula 1")
265 .desc("this is formula 2")
272 .desc("this is formula 3")
284 .desc("this is formula 4")
291 .desc("this is formula 5")
296 .desc("this is formula 6")
300 f2
= (-s1
) / (-s2
) * (-s3
+ ULL(100) + s4
);
302 f6
+= constant(10.0);
336 s10
.sample(1000000000);
337 curTick
+= ULL(1000000);
412 curTick
+= ULL(1000000);
414 curTick
+= ULL(1000000);
416 curTick
+= ULL(1000000);
418 curTick
+= ULL(1000000);
420 curTick
+= ULL(1000000);
427 curTick
+= ULL(1000000);
429 curTick
+= ULL(1000000);
431 curTick
+= ULL(1000000);
433 curTick
+= ULL(1000000);
436 curTick
+= ULL(1000000);
438 curTick
+= ULL(1000000);
440 curTick
+= ULL(1000000);
442 curTick
+= ULL(1000000);
448 curTick
+= ULL(1000000);
455 curTick
+= ULL(1000000);
552 out
.descriptions
= descriptions
;
557 if (!pyfile
.empty()) {
562 if (!mysql_name
.empty()) {
564 out
.connect(mysql_host
, mysql_user
, mysql_passwd
, "m5stats",