OLD | NEW |
1 # Copyright 2011-2012 Free Software Foundation, Inc. | 1 # Copyright 2011-2013 Free Software Foundation, Inc. |
2 | 2 |
3 # This program is free software; you can redistribute it and/or modify | 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 | 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 | 5 # the Free Software Foundation; either version 3 of the License, or |
6 # (at your option) any later version. | 6 # (at your option) any later version. |
7 # | 7 # |
8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 gdb_test "tstatus" ".*Trace .*" "check on trace status" | 67 gdb_test "tstatus" ".*Trace .*" "check on trace status" |
68 | 68 |
69 gdb_test "tstop" "" "" | 69 gdb_test "tstop" "" "" |
70 } | 70 } |
71 | 71 |
72 proc gdb_slow_trace_speed_test { } { | 72 proc gdb_slow_trace_speed_test { } { |
73 | 73 |
74 gdb_delete_tracepoints | 74 gdb_delete_tracepoints |
75 | 75 |
76 gdb_test "print iters = init_iters" ".* = .*"; | 76 gdb_test "print iters = init_iters" ".* = .*" |
77 | 77 |
78 set testline [gdb_get_line_number "set tracepoint here"] | 78 set testline [gdb_get_line_number "set tracepoint here"] |
79 | 79 |
80 gdb_test "trace $testline if (globfoo != 12 && globfoo2 == 45)" \ | 80 gdb_test "trace $testline if (globfoo != 12 && globfoo2 == 45)" \ |
81 "Tracepoint \[0-9\]+ at .*" \ | 81 "Tracepoint \[0-9\]+ at .*" \ |
82 "set slow tracepoint" | 82 "set slow tracepoint" |
83 | 83 |
84 # Begin the test. | 84 # Begin the test. |
85 run_trace_experiment | 85 run_trace_experiment |
86 } | 86 } |
87 | 87 |
88 proc gdb_fast_trace_speed_test { } { | 88 proc gdb_fast_trace_speed_test { } { |
89 global gdb_prompt | 89 global gdb_prompt |
90 | 90 |
91 gdb_delete_tracepoints | 91 gdb_delete_tracepoints |
92 | 92 |
93 gdb_test "print iters = init_iters" ".* = .*"; | 93 gdb_test "print iters = init_iters" ".* = .*" |
94 | 94 |
95 set run_ftrace 0 | 95 set run_ftrace 0 |
96 | 96 |
97 set testline [gdb_get_line_number "set tracepoint here"] | 97 set testline [gdb_get_line_number "set tracepoint here"] |
98 | 98 |
99 gdb_test_multiple "ftrace $testline if (globfoo != 12 && globfoo2 == 45)" \ | 99 gdb_test_multiple "ftrace $testline if (globfoo != 12 && globfoo2 == 45)" \ |
100 "set conditional fast tracepoint" { | 100 "set conditional fast tracepoint" { |
101 -re "Fast tracepoint \[0-9\]+ at .*\r\n$gdb_prompt $" { | 101 -re "Fast tracepoint \[0-9\]+ at .*\r\n$gdb_prompt $" { |
102 pass "set conditional fast tracepoint, done" | 102 pass "set conditional fast tracepoint, done" |
103 set run_ftrace 1 | 103 set run_ftrace 1 |
(...skipping 18 matching lines...) Expand all Loading... |
122 gdb_slow_trace_speed_test | 122 gdb_slow_trace_speed_test |
123 | 123 |
124 gdb_fast_trace_speed_test | 124 gdb_fast_trace_speed_test |
125 } | 125 } |
126 | 126 |
127 clean_restart $executable | 127 clean_restart $executable |
128 runto_main | 128 runto_main |
129 | 129 |
130 if { ![gdb_target_supports_trace] } then { | 130 if { ![gdb_target_supports_trace] } then { |
131 unsupported "Current target does not support trace" | 131 unsupported "Current target does not support trace" |
132 return 1; | 132 return 1 |
133 } | 133 } |
134 | 134 |
135 # Body of test encased in a proc so we can return prematurely. | 135 # Body of test encased in a proc so we can return prematurely. |
136 gdb_trace_collection_test | 136 gdb_trace_collection_test |
OLD | NEW |