Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: src/counters.cc

Issue 18509003: Keep two empty lines between declarations for cpp files (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/contexts.cc ('k') | src/cpu-profiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 if (Enabled()) { 49 if (Enabled()) {
50 isolate()->stats_table()->AddHistogramSample(histogram_, sample); 50 isolate()->stats_table()->AddHistogramSample(histogram_, sample);
51 } 51 }
52 } 52 }
53 53
54 void* Histogram::CreateHistogram() const { 54 void* Histogram::CreateHistogram() const {
55 return isolate()->stats_table()-> 55 return isolate()->stats_table()->
56 CreateHistogram(name_, min_, max_, num_buckets_); 56 CreateHistogram(name_, min_, max_, num_buckets_);
57 } 57 }
58 58
59
59 // Start the timer. 60 // Start the timer.
60 void HistogramTimer::Start() { 61 void HistogramTimer::Start() {
61 if (Enabled()) { 62 if (Enabled()) {
62 stop_time_ = 0; 63 stop_time_ = 0;
63 start_time_ = OS::Ticks(); 64 start_time_ = OS::Ticks();
64 } 65 }
65 if (FLAG_log_internal_timer_events) { 66 if (FLAG_log_internal_timer_events) {
66 LOG(isolate(), TimerEvent(Logger::START, name())); 67 LOG(isolate(), TimerEvent(Logger::START, name()));
67 } 68 }
68 } 69 }
69 70
71
70 // Stop the timer and record the results. 72 // Stop the timer and record the results.
71 void HistogramTimer::Stop() { 73 void HistogramTimer::Stop() {
72 if (Enabled()) { 74 if (Enabled()) {
73 stop_time_ = OS::Ticks(); 75 stop_time_ = OS::Ticks();
74 // Compute the delta between start and stop, in milliseconds. 76 // Compute the delta between start and stop, in milliseconds.
75 int milliseconds = static_cast<int>(stop_time_ - start_time_) / 1000; 77 int milliseconds = static_cast<int>(stop_time_ - start_time_) / 1000;
76 AddSample(milliseconds); 78 AddSample(milliseconds);
77 } 79 }
78 if (FLAG_log_internal_timer_events) { 80 if (FLAG_log_internal_timer_events) {
79 LOG(isolate(), TimerEvent(Logger::END, name())); 81 LOG(isolate(), TimerEvent(Logger::END, name()));
80 } 82 }
81 } 83 }
82 84
83 } } // namespace v8::internal 85 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/contexts.cc ('k') | src/cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698