Mercurial > hg > truffle
comparison src/share/vm/runtime/timer.hpp @ 10418:ff3c23a329ed
Merge
author | Christos Kotselidis <christos.kotselidis@oracle.com> |
---|---|
date | Wed, 19 Jun 2013 20:24:27 +0200 |
parents | f2110083203d |
children | c0b0974dd509 |
comparison
equal
deleted
inserted
replaced
10417:acc1c61ba408 | 10418:ff3c23a329ed |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
80 | 80 |
81 class TraceTime: public StackObj { | 81 class TraceTime: public StackObj { |
82 private: | 82 private: |
83 bool _active; // do timing | 83 bool _active; // do timing |
84 bool _verbose; // report every timing | 84 bool _verbose; // report every timing |
85 bool _print_cr; // add a CR to the end of the timer report | |
86 elapsedTimer _t; // timer | 85 elapsedTimer _t; // timer |
87 elapsedTimer* _accum; // accumulator | 86 elapsedTimer* _accum; // accumulator |
88 outputStream* _logfile; // output log file | |
89 public: | 87 public: |
90 // Constuctors | 88 // Constructors |
91 TraceTime(const char* title, | 89 TraceTime(const char* title, |
92 bool doit = true, | 90 bool doit = true); |
93 bool print_cr = true, | |
94 outputStream *logfile = NULL); | |
95 TraceTime(const char* title, | 91 TraceTime(const char* title, |
96 elapsedTimer* accumulator, | 92 elapsedTimer* accumulator, |
97 bool doit = true, | 93 bool doit = true, |
98 bool verbose = false, | 94 bool verbose = false); |
99 outputStream *logfile = NULL ); | |
100 ~TraceTime(); | 95 ~TraceTime(); |
101 | 96 |
102 // Accessors | 97 // Accessors |
103 void set_verbose(bool verbose) { _verbose = verbose; } | 98 void set_verbose(bool verbose) { _verbose = verbose; } |
104 bool verbose() const { return _verbose; } | 99 bool verbose() const { return _verbose; } |
123 bool print_cr = true, | 118 bool print_cr = true, |
124 outputStream *logfile = NULL); | 119 outputStream *logfile = NULL); |
125 ~TraceCPUTime(); | 120 ~TraceCPUTime(); |
126 }; | 121 }; |
127 | 122 |
123 class TimeHelper { | |
124 public: | |
125 static double counter_to_seconds(jlong counter); | |
126 }; | |
127 | |
128 #endif // SHARE_VM_RUNTIME_TIMER_HPP | 128 #endif // SHARE_VM_RUNTIME_TIMER_HPP |