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

Side by Side Diff: src/assembler.cc

Issue 2338793002: Fix a race condition in simulator that happens when flushing icache. (Closed)
Patch Set: add new line Created 4 years, 3 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
« no previous file with comments | « no previous file | src/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 AssemblerBase::~AssemblerBase() { 184 AssemblerBase::~AssemblerBase() {
185 if (own_buffer_) DeleteArray(buffer_); 185 if (own_buffer_) DeleteArray(buffer_);
186 } 186 }
187 187
188 188
189 void AssemblerBase::FlushICache(Isolate* isolate, void* start, size_t size) { 189 void AssemblerBase::FlushICache(Isolate* isolate, void* start, size_t size) {
190 if (size == 0) return; 190 if (size == 0) return;
191 191
192 #if defined(USE_SIMULATOR) 192 #if defined(USE_SIMULATOR)
193 base::LockGuard<base::Mutex> lock_guard(isolate->simulator_i_cache_mutex());
193 Simulator::FlushICache(isolate->simulator_i_cache(), start, size); 194 Simulator::FlushICache(isolate->simulator_i_cache(), start, size);
194 #else 195 #else
195 CpuFeatures::FlushICache(start, size); 196 CpuFeatures::FlushICache(start, size);
196 #endif // USE_SIMULATOR 197 #endif // USE_SIMULATOR
197 } 198 }
198 199
199 200
200 void AssemblerBase::Print() { 201 void AssemblerBase::Print() {
201 OFStream os(stdout); 202 OFStream os(stdout);
202 v8::internal::Disassembler::Decode(isolate(), &os, buffer_, pc_, nullptr); 203 v8::internal::Disassembler::Decode(isolate(), &os, buffer_, pc_, nullptr);
(...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1956 1957
1957 1958
1958 void Assembler::DataAlign(int m) { 1959 void Assembler::DataAlign(int m) {
1959 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); 1960 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m));
1960 while ((pc_offset() & (m - 1)) != 0) { 1961 while ((pc_offset() & (m - 1)) != 0) {
1961 db(0); 1962 db(0);
1962 } 1963 }
1963 } 1964 }
1964 } // namespace internal 1965 } // namespace internal
1965 } // namespace v8 1966 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698