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

Side by Side Diff: src/log.cc

Issue 10693: Merged bleeding_edge -r 685:746 into regexp2000. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/regexp2000/
Patch Set: Created 12 years, 1 month 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/macro-assembler-arm.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 int start_index, 424 int start_index,
425 Handle<String> input_string) { 425 Handle<String> input_string) {
426 #ifdef ENABLE_LOGGING_AND_PROFILING 426 #ifdef ENABLE_LOGGING_AND_PROFILING
427 if (logfile_ == NULL || !FLAG_log_regexp) return; 427 if (logfile_ == NULL || !FLAG_log_regexp) return;
428 ScopedLock sl(mutex_); 428 ScopedLock sl(mutex_);
429 429
430 fprintf(logfile_, "regexp-run,"); 430 fprintf(logfile_, "regexp-run,");
431 LogRegExpSource(regexp); 431 LogRegExpSource(regexp);
432 fprintf(logfile_, ","); 432 fprintf(logfile_, ",");
433 LogString(input_string); 433 LogString(input_string);
434 StringShape shape(*input_string); 434 fprintf(logfile_, ",%d..%d\n", start_index, input_string->length());
435 fprintf(logfile_, ",%d..%d\n", start_index, input_string->length(shape));
436 #endif 435 #endif
437 } 436 }
438 437
439 438
440 void Logger::ApiIndexedSecurityCheck(uint32_t index) { 439 void Logger::ApiIndexedSecurityCheck(uint32_t index) {
441 #ifdef ENABLE_LOGGING_AND_PROFILING 440 #ifdef ENABLE_LOGGING_AND_PROFILING
442 if (logfile_ == NULL || !FLAG_log_api) return; 441 if (logfile_ == NULL || !FLAG_log_api) return;
443 ApiEvent("api,check-security,%u\n", index); 442 ApiEvent("api,check-security,%u\n", index);
444 #endif 443 #endif
445 } 444 }
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 default: 721 default:
723 // All other %'s expand to themselves. 722 // All other %'s expand to themselves.
724 stream.Put('%'); 723 stream.Put('%');
725 stream.Put(*p); 724 stream.Put(*p);
726 break; 725 break;
727 } 726 }
728 } else { 727 } else {
729 stream.Put(*p); 728 stream.Put(*p);
730 } 729 }
731 } 730 }
732 SmartPointer<char> expanded = stream.ToCString(); 731 SmartPointer<const char> expanded = stream.ToCString();
733 logfile_ = OS::FOpen(*expanded, "w"); 732 logfile_ = OS::FOpen(*expanded, "w");
734 } else { 733 } else {
735 logfile_ = OS::FOpen(FLAG_logfile, "w"); 734 logfile_ = OS::FOpen(FLAG_logfile, "w");
736 } 735 }
737 mutex_ = OS::CreateMutex(); 736 mutex_ = OS::CreateMutex();
738 } 737 }
739 738
740 current_state_ = new VMState(OTHER); 739 current_state_ = new VMState(OTHER);
741 740
742 ticker_ = new Ticker(10); 741 ticker_ = new Ticker(10);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 if (FLAG_log_state_changes) { 841 if (FLAG_log_state_changes) {
843 LOG(StringEvent("Leaving", StateToString(state_))); 842 LOG(StringEvent("Leaving", StateToString(state_)));
844 if (previous_) { 843 if (previous_) {
845 LOG(StringEvent("To", StateToString(previous_->state_))); 844 LOG(StringEvent("To", StateToString(previous_->state_)));
846 } 845 }
847 } 846 }
848 } 847 }
849 #endif 848 #endif
850 849
851 } } // namespace v8::internal 850 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log.h ('k') | src/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698