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

Side by Side Diff: src/compiler.h

Issue 9361026: Count-based profiling for primitive functions (hidden behind a flag) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 // real function with a context. 273 // real function with a context.
274 274
275 class Compiler : public AllStatic { 275 class Compiler : public AllStatic {
276 public: 276 public:
277 // Default maximum number of function optimization attempts before we 277 // Default maximum number of function optimization attempts before we
278 // give up. 278 // give up.
279 static const int kDefaultMaxOptCount = 10; 279 static const int kDefaultMaxOptCount = 10;
280 280
281 static const int kMaxInliningLevels = 3; 281 static const int kMaxInliningLevels = 3;
282 282
283 // Call count before primitive functions trigger their own optimization.
284 static const int kCallsUntilPrimitiveOpt = 200;
285
283 // All routines return a SharedFunctionInfo. 286 // All routines return a SharedFunctionInfo.
284 // If an error occurs an exception is raised and the return handle 287 // If an error occurs an exception is raised and the return handle
285 // contains NULL. 288 // contains NULL.
286 289
287 // Compile a String source within a context. 290 // Compile a String source within a context.
288 static Handle<SharedFunctionInfo> Compile(Handle<String> source, 291 static Handle<SharedFunctionInfo> Compile(Handle<String> source,
289 Handle<Object> script_name, 292 Handle<Object> script_name,
290 int line_offset, 293 int line_offset,
291 int column_offset, 294 int column_offset,
292 v8::Extension* extension, 295 v8::Extension* extension,
(...skipping 29 matching lines...) Expand all
322 325
323 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, 326 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag,
324 CompilationInfo* info, 327 CompilationInfo* info,
325 Handle<SharedFunctionInfo> shared); 328 Handle<SharedFunctionInfo> shared);
326 }; 329 };
327 330
328 331
329 } } // namespace v8::internal 332 } } // namespace v8::internal
330 333
331 #endif // V8_COMPILER_H_ 334 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/compiler.cc » ('j') | src/full-codegen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698