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

Side by Side Diff: src/log.cc

Issue 11411224: Also time external callbacks from generated code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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/log.h ('k') | src/x64/macro-assembler-x64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 if (old_tag != EXTERNAL && new_tag == EXTERNAL) { 720 if (old_tag != EXTERNAL && new_tag == EXTERNAL) {
721 enter_external_ = OS::Ticks(); 721 enter_external_ = OS::Ticks();
722 } 722 }
723 if (old_tag == EXTERNAL && new_tag != EXTERNAL && enter_external_ != 0) { 723 if (old_tag == EXTERNAL && new_tag != EXTERNAL && enter_external_ != 0) {
724 TimerEvent("V8.External", enter_external_, OS::Ticks()); 724 TimerEvent("V8.External", enter_external_, OS::Ticks());
725 enter_external_ = 0; 725 enter_external_ = 0;
726 } 726 }
727 } 727 }
728 728
729 729
730 void Logger::EnterExternal() {
731 LOGGER->enter_external_ = OS::Ticks();
732 }
733
734
735 void Logger::LeaveExternal() {
736 if (enter_external_ == 0) return;
737 Logger* logger = LOGGER;
738 logger->TimerEvent("V8.External", enter_external_, OS::Ticks());
739 logger->enter_external_ = 0;
740 }
741
742
730 int64_t Logger::enter_external_ = 0; 743 int64_t Logger::enter_external_ = 0;
731 744
732 745
733 void Logger::TimerEventScope::LogTimerEvent() { 746 void Logger::TimerEventScope::LogTimerEvent() {
734 LOG(isolate_, TimerEvent(name_, start_, OS::Ticks())); 747 LOG(isolate_, TimerEvent(name_, start_, OS::Ticks()));
735 } 748 }
736 749
737 750
738 const char* Logger::TimerEventScope::v8_recompile_synchronous = 751 const char* Logger::TimerEventScope::v8_recompile_synchronous =
739 "V8.RecompileSynchronous"; 752 "V8.RecompileSynchronous";
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1918 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) { 1931 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) {
1919 ASSERT(sampler->IsActive()); 1932 ASSERT(sampler->IsActive());
1920 ScopedLock lock(active_samplers_mutex); 1933 ScopedLock lock(active_samplers_mutex);
1921 ASSERT(active_samplers_ != NULL); 1934 ASSERT(active_samplers_ != NULL);
1922 bool removed = active_samplers_->RemoveElement(sampler); 1935 bool removed = active_samplers_->RemoveElement(sampler);
1923 ASSERT(removed); 1936 ASSERT(removed);
1924 USE(removed); 1937 USE(removed);
1925 } 1938 }
1926 1939
1927 } } // namespace v8::internal 1940 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log.h ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698