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

Side by Side Diff: src/x64/assembler-x64.cc

Issue 6723014: Avoid TLS access for counters. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix lint Created 9 years, 9 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 | « src/v8-counters.h ('k') | src/x64/builtins-x64.cc » ('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 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 // that we are still not overlapping instructions and relocation info). 408 // that we are still not overlapping instructions and relocation info).
409 ASSERT(pc_ <= reloc_info_writer.pos()); // No overlap. 409 ASSERT(pc_ <= reloc_info_writer.pos()); // No overlap.
410 // Setup code descriptor. 410 // Setup code descriptor.
411 desc->buffer = buffer_; 411 desc->buffer = buffer_;
412 desc->buffer_size = buffer_size_; 412 desc->buffer_size = buffer_size_;
413 desc->instr_size = pc_offset(); 413 desc->instr_size = pc_offset();
414 ASSERT(desc->instr_size > 0); // Zero-size code objects upset the system. 414 ASSERT(desc->instr_size > 0); // Zero-size code objects upset the system.
415 desc->reloc_size = 415 desc->reloc_size =
416 static_cast<int>((buffer_ + buffer_size_) - reloc_info_writer.pos()); 416 static_cast<int>((buffer_ + buffer_size_) - reloc_info_writer.pos());
417 desc->origin = this; 417 desc->origin = this;
418
419 COUNTERS->reloc_info_size()->Increment(desc->reloc_size);
420 } 418 }
421 419
422 420
423 void Assembler::Align(int m) { 421 void Assembler::Align(int m) {
424 ASSERT(IsPowerOf2(m)); 422 ASSERT(IsPowerOf2(m));
425 int delta = (m - (pc_offset() & (m - 1))) & (m - 1); 423 int delta = (m - (pc_offset() & (m - 1))) & (m - 1);
426 while (delta >= 9) { 424 while (delta >= 9) {
427 nop(9); 425 nop(9);
428 delta -= 9; 426 delta -= 9;
429 } 427 }
(...skipping 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after
3160 // specially coded on x64 means that it is a relative 32 bit address, as used 3158 // specially coded on x64 means that it is a relative 32 bit address, as used
3161 // by branch instructions. 3159 // by branch instructions.
3162 return (1 << rmode_) & kApplyMask; 3160 return (1 << rmode_) & kApplyMask;
3163 } 3161 }
3164 3162
3165 3163
3166 3164
3167 } } // namespace v8::internal 3165 } } // namespace v8::internal
3168 3166
3169 #endif // V8_TARGET_ARCH_X64 3167 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/v8-counters.h ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698