1 | # This program is under CECILL_B licence. See footer for details. |
---|
2 | |
---|
3 | rename proc _proc |
---|
4 | |
---|
5 | |
---|
6 | _proc proc {name params body} { |
---|
7 | global FunctionUsed |
---|
8 | global FunctionTime |
---|
9 | global TraceProfile |
---|
10 | |
---|
11 | |
---|
12 | |
---|
13 | set FunctionTime "" |
---|
14 | |
---|
15 | if { $name in "::tk::TearOffMenu ::tk::MenuDup Window_profiling Window_profiling_trace" } { |
---|
16 | puts "skipping $name" |
---|
17 | } else { |
---|
18 | #puts "adding $name" |
---|
19 | set FunctionUsed($name) 0 |
---|
20 | set body "global FunctionUsed \n global FunctionTime \n global TraceProfile \n if {\$TraceProfile} { \n incr FunctionUsed($name) \n lappend FunctionTime IN#$name#\[clock microseconds\] \n } \n $body \n \n if {\$TraceProfile} { \n lappend FunctionTime OUT#$name#\[clock microseconds\] \n }" |
---|
21 | } |
---|
22 | _proc $name $params $body |
---|
23 | } |
---|
24 | |
---|
25 | |
---|
26 | # Copyright CERFACS 2014 |
---|
27 | # |
---|
28 | # antoine.dauptain@cerfacs.fr |
---|
29 | # |
---|
30 | # This software is a computer program whose purpose is to ensure technology |
---|
31 | # transfer between academia and industry. |
---|
32 | # |
---|
33 | # This software is governed by the CeCILL-B license under French law and |
---|
34 | # abiding by the rules of distribution of free software. You can use, |
---|
35 | # modify and/ or redistribute the software under the terms of the CeCILL-B |
---|
36 | # license as circulated by CEA, CNRS and INRIA at the following URL |
---|
37 | # "http://www.cecill.info". |
---|
38 | # |
---|
39 | # As a counterpart to the access to the source code and rights to copy, |
---|
40 | # modify and redistribute granted by the license, users are provided only |
---|
41 | # with a limited warranty and the software's author, the holder of the |
---|
42 | # economic rights, and the successive licensors have only limited |
---|
43 | # liability. |
---|
44 | # |
---|
45 | # In this respect, the user's attention is drawn to the risks associated |
---|
46 | # with loading, using, modifying and/or developing or reproducing the |
---|
47 | # software by the user in light of its specific status of free software, |
---|
48 | # that may mean that it is complicated to manipulate, and that also |
---|
49 | # therefore means that it is reserved for developers and experienced |
---|
50 | # professionals having in-depth computer knowledge. Users are therefore |
---|
51 | # encouraged to load and test the software's suitability as regards their |
---|
52 | # requirements in conditions enabling the security of their systems and/or |
---|
53 | # data to be ensured and, more generally, to use and operate it in the |
---|
54 | # same conditions as regards security. |
---|
55 | # |
---|
56 | # The fact that you are presently reading this means that you have had |
---|
57 | # knowledge of the CeCILL-B license and that you accept its terms. |
---|