| 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 25 matching lines...) Expand all Loading... |
| 36 #include "global-handles.h" | 36 #include "global-handles.h" |
| 37 #include "jsregexp.h" | 37 #include "jsregexp.h" |
| 38 #include "mark-compact.h" | 38 #include "mark-compact.h" |
| 39 #include "natives.h" | 39 #include "natives.h" |
| 40 #include "scanner.h" | 40 #include "scanner.h" |
| 41 #include "scopeinfo.h" | 41 #include "scopeinfo.h" |
| 42 #include "v8threads.h" | 42 #include "v8threads.h" |
| 43 | 43 |
| 44 namespace v8 { namespace internal { | 44 namespace v8 { namespace internal { |
| 45 | 45 |
| 46 #ifdef DEBUG | |
| 47 DEFINE_bool(gc_greedy, false, "perform GC prior to some allocations"); | |
| 48 DEFINE_bool(gc_verbose, false, "print stuff during garbage collection"); | |
| 49 DEFINE_bool(heap_stats, false, "report heap statistics before and after GC"); | |
| 50 DEFINE_bool(code_stats, false, "report code statistics after GC"); | |
| 51 DEFINE_bool(verify_heap, false, "verify heap pointers before and after GC"); | |
| 52 DEFINE_bool(print_handles, false, "report handles after GC"); | |
| 53 DEFINE_bool(print_global_handles, false, "report global handles after GC"); | |
| 54 DEFINE_bool(print_rset, false, "print remembered sets before GC"); | |
| 55 #endif | |
| 56 | |
| 57 DEFINE_int(new_space_size, 0, "size of (each semispace in) the new generation"); | |
| 58 DEFINE_int(old_space_size, 0, "size of the old generation"); | |
| 59 | |
| 60 DEFINE_bool(gc_global, false, "always perform global GCs"); | |
| 61 DEFINE_int(gc_interval, -1, "garbage collect after <n> allocations"); | |
| 62 DEFINE_bool(trace_gc, false, | |
| 63 "print one trace line following each garbage collection"); | |
| 64 | |
| 65 | |
| 66 #ifdef ENABLE_LOGGING_AND_PROFILING | |
| 67 DECLARE_bool(log_gc); | |
| 68 #endif | |
| 69 | |
| 70 | |
| 71 #define ROOT_ALLOCATION(type, name) type* Heap::name##_; | 46 #define ROOT_ALLOCATION(type, name) type* Heap::name##_; |
| 72 ROOT_LIST(ROOT_ALLOCATION) | 47 ROOT_LIST(ROOT_ALLOCATION) |
| 73 #undef ROOT_ALLOCATION | 48 #undef ROOT_ALLOCATION |
| 74 | 49 |
| 75 | 50 |
| 76 #define STRUCT_ALLOCATION(NAME, Name, name) Map* Heap::name##_map_; | 51 #define STRUCT_ALLOCATION(NAME, Name, name) Map* Heap::name##_map_; |
| 77 STRUCT_LIST(STRUCT_ALLOCATION) | 52 STRUCT_LIST(STRUCT_ALLOCATION) |
| 78 #undef STRUCT_ALLOCATION | 53 #undef STRUCT_ALLOCATION |
| 79 | 54 |
| 80 | 55 |
| (...skipping 2979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3060 return "Scavenge"; | 3035 return "Scavenge"; |
| 3061 case MARK_COMPACTOR: | 3036 case MARK_COMPACTOR: |
| 3062 return MarkCompactCollector::HasCompacted() ? "Mark-compact" | 3037 return MarkCompactCollector::HasCompacted() ? "Mark-compact" |
| 3063 : "Mark-sweep"; | 3038 : "Mark-sweep"; |
| 3064 } | 3039 } |
| 3065 return "Unknown GC"; | 3040 return "Unknown GC"; |
| 3066 } | 3041 } |
| 3067 | 3042 |
| 3068 | 3043 |
| 3069 } } // namespace v8::internal | 3044 } } // namespace v8::internal |
| OLD | NEW |