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

Side by Side Diff: src/arm/full-codegen-arm.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/arm/codegen-arm.cc ('k') | src/arm/ic-arm.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 4211 matching lines...) Expand 10 before | Expand all | Expand 10 after
4222 4222
4223 4223
4224 Register FullCodeGenerator::context_register() { 4224 Register FullCodeGenerator::context_register() {
4225 return cp; 4225 return cp;
4226 } 4226 }
4227 4227
4228 4228
4229 void FullCodeGenerator::EmitCallIC(Handle<Code> ic, RelocInfo::Mode mode) { 4229 void FullCodeGenerator::EmitCallIC(Handle<Code> ic, RelocInfo::Mode mode) {
4230 ASSERT(mode == RelocInfo::CODE_TARGET || 4230 ASSERT(mode == RelocInfo::CODE_TARGET ||
4231 mode == RelocInfo::CODE_TARGET_CONTEXT); 4231 mode == RelocInfo::CODE_TARGET_CONTEXT);
4232 Counters* counters = isolate()->counters();
4232 switch (ic->kind()) { 4233 switch (ic->kind()) {
4233 case Code::LOAD_IC: 4234 case Code::LOAD_IC:
4234 __ IncrementCounter(COUNTERS->named_load_full(), 1, r1, r2); 4235 __ IncrementCounter(counters->named_load_full(), 1, r1, r2);
4235 break; 4236 break;
4236 case Code::KEYED_LOAD_IC: 4237 case Code::KEYED_LOAD_IC:
4237 __ IncrementCounter(COUNTERS->keyed_load_full(), 1, r1, r2); 4238 __ IncrementCounter(counters->keyed_load_full(), 1, r1, r2);
4238 break; 4239 break;
4239 case Code::STORE_IC: 4240 case Code::STORE_IC:
4240 __ IncrementCounter(COUNTERS->named_store_full(), 1, r1, r2); 4241 __ IncrementCounter(counters->named_store_full(), 1, r1, r2);
4241 break; 4242 break;
4242 case Code::KEYED_STORE_IC: 4243 case Code::KEYED_STORE_IC:
4243 __ IncrementCounter(COUNTERS->keyed_store_full(), 1, r1, r2); 4244 __ IncrementCounter(counters->keyed_store_full(), 1, r1, r2);
4244 default: 4245 default:
4245 break; 4246 break;
4246 } 4247 }
4247 4248
4248 __ Call(ic, mode); 4249 __ Call(ic, mode);
4249 } 4250 }
4250 4251
4251 4252
4252 void FullCodeGenerator::EmitCallIC(Handle<Code> ic, JumpPatchSite* patch_site) { 4253 void FullCodeGenerator::EmitCallIC(Handle<Code> ic, JumpPatchSite* patch_site) {
4254 Counters* counters = isolate()->counters();
4253 switch (ic->kind()) { 4255 switch (ic->kind()) {
4254 case Code::LOAD_IC: 4256 case Code::LOAD_IC:
4255 __ IncrementCounter(COUNTERS->named_load_full(), 1, r1, r2); 4257 __ IncrementCounter(counters->named_load_full(), 1, r1, r2);
4256 break; 4258 break;
4257 case Code::KEYED_LOAD_IC: 4259 case Code::KEYED_LOAD_IC:
4258 __ IncrementCounter(COUNTERS->keyed_load_full(), 1, r1, r2); 4260 __ IncrementCounter(counters->keyed_load_full(), 1, r1, r2);
4259 break; 4261 break;
4260 case Code::STORE_IC: 4262 case Code::STORE_IC:
4261 __ IncrementCounter(COUNTERS->named_store_full(), 1, r1, r2); 4263 __ IncrementCounter(counters->named_store_full(), 1, r1, r2);
4262 break; 4264 break;
4263 case Code::KEYED_STORE_IC: 4265 case Code::KEYED_STORE_IC:
4264 __ IncrementCounter(COUNTERS->keyed_store_full(), 1, r1, r2); 4266 __ IncrementCounter(counters->keyed_store_full(), 1, r1, r2);
4265 default: 4267 default:
4266 break; 4268 break;
4267 } 4269 }
4268 4270
4269 __ Call(ic, RelocInfo::CODE_TARGET); 4271 __ Call(ic, RelocInfo::CODE_TARGET);
4270 if (patch_site != NULL && patch_site->is_bound()) { 4272 if (patch_site != NULL && patch_site->is_bound()) {
4271 patch_site->EmitPatchInfo(); 4273 patch_site->EmitPatchInfo();
4272 } else { 4274 } else {
4273 __ nop(); // Signals no inlined code. 4275 __ nop(); // Signals no inlined code.
4274 } 4276 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
4312 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 4314 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
4313 __ add(pc, r1, Operand(masm_->CodeObject())); 4315 __ add(pc, r1, Operand(masm_->CodeObject()));
4314 } 4316 }
4315 4317
4316 4318
4317 #undef __ 4319 #undef __
4318 4320
4319 } } // namespace v8::internal 4321 } } // namespace v8::internal
4320 4322
4321 #endif // V8_TARGET_ARCH_ARM 4323 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/ic-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698