OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 | 900 |
901 void Logger::CodeCreateEvent(const char* tag, Code* code, String* name, | 901 void Logger::CodeCreateEvent(const char* tag, Code* code, String* name, |
902 String* source, int line) { | 902 String* source, int line) { |
903 #ifdef ENABLE_LOGGING_AND_PROFILING | 903 #ifdef ENABLE_LOGGING_AND_PROFILING |
904 if (!Log::is_enabled() || !FLAG_log_code) return; | 904 if (!Log::is_enabled() || !FLAG_log_code) return; |
905 LogMessageBuilder msg; | 905 LogMessageBuilder msg; |
906 SmartPointer<char> str = | 906 SmartPointer<char> str = |
907 name->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); | 907 name->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); |
908 SmartPointer<char> sourcestr = | 908 SmartPointer<char> sourcestr = |
909 source->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); | 909 source->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); |
910 msg.Append("code-creation,%s,0x%"V8PRIp",%d,\"%s %s:%d\"\n", tag, code->addres
s(), | 910 msg.Append("code-creation,%s,0x%"V8PRIp",%d,\"%s %s:%d\"\n", |
| 911 tag, code->address(), |
911 code->ExecutableSize(), | 912 code->ExecutableSize(), |
912 *str, *sourcestr, line); | 913 *str, *sourcestr, line); |
913 msg.WriteToLogFile(); | 914 msg.WriteToLogFile(); |
914 #endif | 915 #endif |
915 } | 916 } |
916 | 917 |
917 | 918 |
918 void Logger::CodeCreateEvent(const char* tag, Code* code, int args_count) { | 919 void Logger::CodeCreateEvent(const char* tag, Code* code, int args_count) { |
919 #ifdef ENABLE_LOGGING_AND_PROFILING | 920 #ifdef ENABLE_LOGGING_AND_PROFILING |
920 if (!Log::is_enabled() || !FLAG_log_code) return; | 921 if (!Log::is_enabled() || !FLAG_log_code) return; |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1312 } else if (previous_->state_ == EXTERNAL) { | 1313 } else if (previous_->state_ == EXTERNAL) { |
1313 // We are leaving V8. | 1314 // We are leaving V8. |
1314 Heap::Protect(); | 1315 Heap::Protect(); |
1315 } | 1316 } |
1316 } | 1317 } |
1317 #endif | 1318 #endif |
1318 } | 1319 } |
1319 #endif | 1320 #endif |
1320 | 1321 |
1321 } } // namespace v8::internal | 1322 } } // namespace v8::internal |
OLD | NEW |