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

Side by Side Diff: src/code-stubs.cc

Issue 1317003: Align OProfile agent invocations style with logging. (Closed)
Patch Set: Created 10 years, 9 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
« no previous file with comments | « no previous file | src/compiler.h » ('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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 masm->set_allow_stub_calls(AllowsStubCalls()); 54 masm->set_allow_stub_calls(AllowsStubCalls());
55 // Generate the code for the stub. 55 // Generate the code for the stub.
56 masm->set_generating_stub(true); 56 masm->set_generating_stub(true);
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 #ifdef ENABLE_OPROFILE_AGENT 64 OPROFILE(CreateNativeCodeRegion(GetName(),
65 // Register the generated stub with the OPROFILE agent. 65 code->instruction_start(),
66 OProfileAgent::CreateNativeCodeRegion(GetName(), 66 code->instruction_size()));
67 code->instruction_start(),
68 code->instruction_size());
69 #endif
70
71 LOG(CodeCreateEvent(Logger::STUB_TAG, code, GetName())); 67 LOG(CodeCreateEvent(Logger::STUB_TAG, code, GetName()));
72 Counters::total_stubs_code_size.Increment(code->instruction_size()); 68 Counters::total_stubs_code_size.Increment(code->instruction_size());
73 69
74 #ifdef ENABLE_DISASSEMBLER 70 #ifdef ENABLE_DISASSEMBLER
75 if (FLAG_print_code_stubs) { 71 if (FLAG_print_code_stubs) {
76 #ifdef DEBUG 72 #ifdef DEBUG
77 Print(); 73 Print();
78 #endif 74 #endif
79 code->Disassemble(GetName()); 75 code->Disassemble(GetName());
80 PrintF("\n"); 76 PrintF("\n");
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 default: 170 default:
175 if (!allow_unknown_keys) { 171 if (!allow_unknown_keys) {
176 UNREACHABLE(); 172 UNREACHABLE();
177 } 173 }
178 return NULL; 174 return NULL;
179 } 175 }
180 } 176 }
181 177
182 178
183 } } // namespace v8::internal 179 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698