OLD | NEW |
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 2275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2286 } | 2286 } |
2287 | 2287 |
2288 bool IsLowSurvivalRate() { | 2288 bool IsLowSurvivalRate() { |
2289 return low_survival_rate_period_length_ > 0; | 2289 return low_survival_rate_period_length_ > 0; |
2290 } | 2290 } |
2291 | 2291 |
2292 void SelectScavengingVisitorsTable(); | 2292 void SelectScavengingVisitorsTable(); |
2293 | 2293 |
2294 void StartIdleRound() { | 2294 void StartIdleRound() { |
2295 mark_sweeps_since_idle_round_started_ = 0; | 2295 mark_sweeps_since_idle_round_started_ = 0; |
2296 ms_count_at_last_idle_notification_ = ms_count_; | |
2297 } | 2296 } |
2298 | 2297 |
2299 void FinishIdleRound() { | 2298 void FinishIdleRound() { |
2300 mark_sweeps_since_idle_round_started_ = kMaxMarkSweepsInIdleRound; | 2299 mark_sweeps_since_idle_round_started_ = kMaxMarkSweepsInIdleRound; |
2301 scavenges_since_last_idle_round_ = 0; | 2300 scavenges_since_last_idle_round_ = 0; |
2302 } | 2301 } |
2303 | 2302 |
2304 bool EnoughGarbageSinceLastIdleRound() { | 2303 bool EnoughGarbageSinceLastIdleRound() { |
2305 return (scavenges_since_last_idle_round_ >= kIdleScavengeThreshold); | 2304 return (scavenges_since_last_idle_round_ >= kIdleScavengeThreshold); |
2306 } | 2305 } |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2363 | 2362 |
2364 Marking marking_; | 2363 Marking marking_; |
2365 | 2364 |
2366 IncrementalMarking incremental_marking_; | 2365 IncrementalMarking incremental_marking_; |
2367 | 2366 |
2368 int number_idle_notifications_; | 2367 int number_idle_notifications_; |
2369 unsigned int last_idle_notification_gc_count_; | 2368 unsigned int last_idle_notification_gc_count_; |
2370 bool last_idle_notification_gc_count_init_; | 2369 bool last_idle_notification_gc_count_init_; |
2371 | 2370 |
2372 int mark_sweeps_since_idle_round_started_; | 2371 int mark_sweeps_since_idle_round_started_; |
2373 int ms_count_at_last_idle_notification_; | |
2374 unsigned int gc_count_at_last_idle_gc_; | 2372 unsigned int gc_count_at_last_idle_gc_; |
2375 int scavenges_since_last_idle_round_; | 2373 int scavenges_since_last_idle_round_; |
2376 | 2374 |
2377 // If the --deopt_every_n_garbage_collections flag is set to a positive value, | 2375 // If the --deopt_every_n_garbage_collections flag is set to a positive value, |
2378 // this variable holds the number of garbage collections since the last | 2376 // this variable holds the number of garbage collections since the last |
2379 // deoptimization triggered by garbage collection. | 2377 // deoptimization triggered by garbage collection. |
2380 int gcs_since_last_deopt_; | 2378 int gcs_since_last_deopt_; |
2381 | 2379 |
2382 #ifdef VERIFY_HEAP | 2380 #ifdef VERIFY_HEAP |
2383 int no_weak_embedded_maps_verification_scope_depth_; | 2381 int no_weak_embedded_maps_verification_scope_depth_; |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3076 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3074 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
3077 | 3075 |
3078 private: | 3076 private: |
3079 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3077 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
3080 }; | 3078 }; |
3081 #endif // DEBUG | 3079 #endif // DEBUG |
3082 | 3080 |
3083 } } // namespace v8::internal | 3081 } } // namespace v8::internal |
3084 | 3082 |
3085 #endif // V8_HEAP_H_ | 3083 #endif // V8_HEAP_H_ |
OLD | NEW |