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

Side by Side Diff: src/store-buffer.cc

Issue 17303006: Report store buffer overflows to v8 counters. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 delete[] hash_set_1_; 114 delete[] hash_set_1_;
115 delete[] hash_set_2_; 115 delete[] hash_set_2_;
116 old_start_ = old_top_ = old_limit_ = old_reserved_limit_ = NULL; 116 old_start_ = old_top_ = old_limit_ = old_reserved_limit_ = NULL;
117 start_ = limit_ = NULL; 117 start_ = limit_ = NULL;
118 heap_->public_set_store_buffer_top(start_); 118 heap_->public_set_store_buffer_top(start_);
119 } 119 }
120 120
121 121
122 void StoreBuffer::StoreBufferOverflow(Isolate* isolate) { 122 void StoreBuffer::StoreBufferOverflow(Isolate* isolate) {
123 isolate->heap()->store_buffer()->Compact(); 123 isolate->heap()->store_buffer()->Compact();
124 isolate->counters()->store_buffer_overflows()->Increment();
124 } 125 }
125 126
126 127
127 void StoreBuffer::Uniq() { 128 void StoreBuffer::Uniq() {
128 // Remove adjacent duplicates and cells that do not point at new space. 129 // Remove adjacent duplicates and cells that do not point at new space.
129 Address previous = NULL; 130 Address previous = NULL;
130 Address* write = old_start_; 131 Address* write = old_start_;
131 ASSERT(may_move_store_buffer_entries_); 132 ASSERT(may_move_store_buffer_entries_);
132 for (Address* read = old_start_; read < old_top_; read++) { 133 for (Address* read = old_start_; read < old_top_; read++) {
133 Address current = *read; 134 Address current = *read;
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 } 687 }
687 old_buffer_is_sorted_ = false; 688 old_buffer_is_sorted_ = false;
688 old_buffer_is_filtered_ = false; 689 old_buffer_is_filtered_ = false;
689 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); 690 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2);
690 ASSERT(old_top_ <= old_limit_); 691 ASSERT(old_top_ <= old_limit_);
691 } 692 }
692 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); 693 heap_->isolate()->counters()->store_buffer_compactions()->Increment();
693 } 694 }
694 695
695 } } // namespace v8::internal 696 } } // 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