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

Side by Side Diff: src/compilation-cache.cc

Issue 267092: Add comment to compilation-cache.cc explaining choice of 5 generations. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 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 25 matching lines...) Expand all
36 // The number of sub caches covering the different types to cache. 36 // The number of sub caches covering the different types to cache.
37 static const int kSubCacheCount = 4; 37 static const int kSubCacheCount = 4;
38 38
39 // The number of generations for each sub cache. 39 // The number of generations for each sub cache.
40 #if defined(ANDROID) 40 #if defined(ANDROID)
41 static const int kScriptGenerations = 1; 41 static const int kScriptGenerations = 1;
42 static const int kEvalGlobalGenerations = 1; 42 static const int kEvalGlobalGenerations = 1;
43 static const int kEvalContextualGenerations = 1; 43 static const int kEvalContextualGenerations = 1;
44 static const int kRegExpGenerations = 1; 44 static const int kRegExpGenerations = 1;
45 #else 45 #else
46 // The number of ScriptGenerations is carefully chosen based on histograms.
47 // See issue 458: http://code.google.com/p/v8/issues/detail?id=458
46 static const int kScriptGenerations = 5; 48 static const int kScriptGenerations = 5;
47 static const int kEvalGlobalGenerations = 2; 49 static const int kEvalGlobalGenerations = 2;
48 static const int kEvalContextualGenerations = 2; 50 static const int kEvalContextualGenerations = 2;
49 static const int kRegExpGenerations = 2; 51 static const int kRegExpGenerations = 2;
50 #endif 52 #endif
51 53
52 // Initial size of each compilation cache table allocated. 54 // Initial size of each compilation cache table allocated.
53 static const int kInitialCacheSize = 64; 55 static const int kInitialCacheSize = 64;
54 56
55 // The compilation cache consists of several generational sub-caches which uses 57 // The compilation cache consists of several generational sub-caches which uses
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 } 481 }
480 482
481 483
482 void CompilationCache::Disable() { 484 void CompilationCache::Disable() {
483 enabled = false; 485 enabled = false;
484 Clear(); 486 Clear();
485 } 487 }
486 488
487 489
488 } } // namespace v8::internal 490 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698