| OLD | NEW |
| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 Generate(masm); | 57 Generate(masm); |
| 58 } | 58 } |
| 59 | 59 |
| 60 | 60 |
| 61 void CodeStub::RecordCodeGeneration(Code* code, MacroAssembler* masm) { | 61 void CodeStub::RecordCodeGeneration(Code* code, MacroAssembler* masm) { |
| 62 code->set_major_key(MajorKey()); | 62 code->set_major_key(MajorKey()); |
| 63 | 63 |
| 64 OPROFILE(CreateNativeCodeRegion(GetName(), | 64 OPROFILE(CreateNativeCodeRegion(GetName(), |
| 65 code->instruction_start(), | 65 code->instruction_start(), |
| 66 code->instruction_size())); | 66 code->instruction_size())); |
| 67 LOG(CodeCreateEvent(Logger::STUB_TAG, code, GetName())); | 67 PROFILE(CodeCreateEvent(Logger::STUB_TAG, code, GetName())); |
| 68 Counters::total_stubs_code_size.Increment(code->instruction_size()); | 68 Counters::total_stubs_code_size.Increment(code->instruction_size()); |
| 69 | 69 |
| 70 #ifdef ENABLE_DISASSEMBLER | 70 #ifdef ENABLE_DISASSEMBLER |
| 71 if (FLAG_print_code_stubs) { | 71 if (FLAG_print_code_stubs) { |
| 72 #ifdef DEBUG | 72 #ifdef DEBUG |
| 73 Print(); | 73 Print(); |
| 74 #endif | 74 #endif |
| 75 code->Disassemble(GetName()); | 75 code->Disassemble(GetName()); |
| 76 PrintF("\n"); | 76 PrintF("\n"); |
| 77 } | 77 } |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 default: | 170 default: |
| 171 if (!allow_unknown_keys) { | 171 if (!allow_unknown_keys) { |
| 172 UNREACHABLE(); | 172 UNREACHABLE(); |
| 173 } | 173 } |
| 174 return NULL; | 174 return NULL; |
| 175 } | 175 } |
| 176 } | 176 } |
| 177 | 177 |
| 178 | 178 |
| 179 } } // namespace v8::internal | 179 } } // namespace v8::internal |
| OLD | NEW |