]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.perf/gmonster1.exp
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.perf / gmonster1.exp
1 # Copyright (C) 2015-2024 Free Software Foundation, Inc.
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 # Perftest description file for building the "gmonster1" benchmark.
17 # Where does the name come from? The benchmark is derived from one of the
18 # monster programs at Google.
19 #
20 # Perftest descriptions are loaded thrice:
21 # 1) To generate the build .exp files
22 # GDB_PERFTEST_MODE=gen-build-exps
23 # This step allows for parallel builds of the majority of pieces of the
24 # test binary and shlibs.
25 # 2) To compile the "pieces" of the binary and shlibs.
26 # "Pieces" are the bulk of the machine-generated sources of the test.
27 # This step is driven by lib/build-piece.exp.
28 # GDB_PERFTEST_MODE=build-pieces
29 # 3) To perform the final link of the binary and shlibs.
30 # GDB_PERFTEST_MODE=compile
31 #
32 # Example usage:
33 # bash$ make -j5 build-perf RUNTESTFLAGS="gmonster1.exp gmonster2.exp"
34 # bash$ make check-perf RUNTESTFLAGS="gdb.perf/gm*-*.exp GDB=/path/to/gdb"
35
36 load_lib perftest.exp
37 load_lib gen-perf-test.exp
38
39 require allow_perf_tests
40
41 if ![info exists MONSTER] {
42 set MONSTER "n"
43 }
44
45 proc make_testcase_config { } {
46 global MONSTER
47
48 set program_name "gmonster1"
49 array set testcase [GenPerfTest::init_testcase $program_name]
50
51 set testcase(language) c++
52
53 # *_{sources,headers} need to be embedded in an outer list
54 # because remember each element of the outer list is for each run, and
55 # here we want to use the same value for all runs.
56 set testcase(binary_extra_sources) { { gmonster1.cc gm-hello.cc gm-use-cerr.cc gm-pervasive-typedef.cc } }
57 set testcase(binary_extra_headers) { { <stdint.h> gm-utils.h gm-std.h gm-pervasive-typedef.h } }
58 set testcase(tail_shlib_sources) { { gm-std.cc } }
59 set testcase(tail_shlib_headers) { { gm-std.h } }
60
61 if { $MONSTER == "y" } {
62 set testcase(run_names) { 10-cus 100-cus 1000-cus 10000-cus }
63 set testcase(nr_compunits) { 10 100 1000 10000 }
64 } else {
65 set testcase(run_names) { 1-cu 10-cus 100-cus }
66 set testcase(nr_compunits) { 1 10 100 }
67 }
68 set testcase(nr_gen_shlibs) { 0 }
69
70 set testcase(nr_extern_globals) 10
71 set testcase(nr_static_globals) 10
72 set testcase(nr_extern_functions) 10
73 set testcase(nr_static_functions) 10
74
75 # class_specs needs to be embedded in an outer list because remember
76 # each element of the outer list is for each run, and here we want to use
77 # the same value for all runs.
78 set testcase(class_specs) { {
79 {
80 count 1 name { class }
81 nr_members 10 nr_static_members 10
82 nr_methods 10 nr_static_methods 10
83 nr_inline_methods 10 nr_static_inline_methods 10
84 }
85 {
86 count 1 name { ns0 class }
87 nr_members 10 nr_static_members 10
88 nr_methods 10 nr_static_methods 10
89 nr_inline_methods 10 nr_static_inline_methods 10
90 }
91 {
92 count 1 name { ns0 anonymous aclass }
93 nr_members 10 nr_static_members 10
94 nr_methods 10 nr_static_methods 10
95 nr_inline_methods 10 nr_static_inline_methods 10
96 }
97 {
98 count 1 name { ns0 ns1 class }
99 nr_members 10 nr_static_members 10
100 nr_methods 10 nr_static_methods 10
101 nr_inline_methods 10 nr_static_inline_methods 10
102 }
103 {
104 count 1 name { ns0 anonymous ns1 aclass }
105 nr_members 10 nr_static_members 10
106 nr_methods 10 nr_static_methods 10
107 nr_inline_methods 10 nr_static_inline_methods 10
108 }
109 } }
110
111 return [array get testcase]
112 }
113
114 GenPerfTest::standard_compile_driver gmonster1.exp make_testcase_config