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

Side by Side Diff: src/codegen.cc

Issue 27023003: Add histograms to track fraction of heap spaces and percentage of crankshaft code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add comment Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/heap.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 CodeDesc desc; 109 CodeDesc desc;
110 bool is_crankshafted = 110 bool is_crankshafted =
111 Code::ExtractKindFromFlags(flags) == Code::OPTIMIZED_FUNCTION || 111 Code::ExtractKindFromFlags(flags) == Code::OPTIMIZED_FUNCTION ||
112 info->IsStub(); 112 info->IsStub();
113 masm->GetCode(&desc); 113 masm->GetCode(&desc);
114 Handle<Code> code = 114 Handle<Code> code =
115 isolate->factory()->NewCode(desc, flags, masm->CodeObject(), 115 isolate->factory()->NewCode(desc, flags, masm->CodeObject(),
116 false, is_crankshafted); 116 false, is_crankshafted);
117 isolate->counters()->total_compiled_code_size()->Increment( 117 isolate->counters()->total_compiled_code_size()->Increment(
118 code->instruction_size()); 118 code->instruction_size());
119 isolate->heap()->IncrementCodeGeneratedBytes(is_crankshafted,
120 code->instruction_size());
119 code->set_prologue_offset(info->prologue_offset()); 121 code->set_prologue_offset(info->prologue_offset());
120 return code; 122 return code;
121 } 123 }
122 124
123 125
124 void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) { 126 void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) {
125 #ifdef ENABLE_DISASSEMBLER 127 #ifdef ENABLE_DISASSEMBLER
126 AllowDeferredHandleDereference allow_deference_for_print_code; 128 AllowDeferredHandleDereference allow_deference_for_print_code;
127 bool print_code = info->isolate()->bootstrapper()->IsActive() 129 bool print_code = info->isolate()->bootstrapper()->IsActive()
128 ? FLAG_print_builtin_code 130 ? FLAG_print_builtin_code
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 ASSERT(result_size_ == 1 || result_size_ == 2); 225 ASSERT(result_size_ == 1 || result_size_ == 2);
224 #ifdef _WIN64 226 #ifdef _WIN64
225 return result | ((result_size_ == 1) ? 0 : 2); 227 return result | ((result_size_ == 1) ? 0 : 2);
226 #else 228 #else
227 return result; 229 return result;
228 #endif 230 #endif
229 } 231 }
230 232
231 233
232 } } // namespace v8::internal 234 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698