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

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

Issue 6696042: Adding 'isolates' argument to LOG to get rid of multiple TLS fetches in profiling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/isolates
Patch Set: Addressing code review feedback + rebase 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/vm-state-inl.h ('k') | src/x64/regexp-macro-assembler-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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 __ movq(rsp, rbp); 112 __ movq(rsp, rbp);
113 __ pop(rbx); 113 __ pop(rbx);
114 __ pop(rcx); 114 __ pop(rcx);
115 __ popfq(); 115 __ popfq();
116 __ pop(rbp); 116 __ pop(rbp);
117 __ ret(0); 117 __ ret(0);
118 #undef __ 118 #undef __
119 119
120 CodeDesc desc; 120 CodeDesc desc;
121 assm.GetCode(&desc); 121 assm.GetCode(&desc);
122 MaybeObject* maybe_code = HEAP->CreateCode(desc, 122 Isolate* isolate = Isolate::Current();
123 Code::ComputeFlags(Code::STUB), 123 MaybeObject* maybe_code =
124 Handle<Object>()); 124 isolate->heap()->CreateCode(desc,
125 Code::ComputeFlags(Code::STUB),
126 Handle<Object>());
125 Object* code; 127 Object* code;
126 if (!maybe_code->ToObject(&code)) return; 128 if (!maybe_code->ToObject(&code)) return;
127 if (!code->IsCode()) return; 129 if (!code->IsCode()) return;
128 PROFILE(CodeCreateEvent(Logger::BUILTIN_TAG, 130 PROFILE(isolate,
131 CodeCreateEvent(Logger::BUILTIN_TAG,
129 Code::cast(code), "CpuFeatures::Probe")); 132 Code::cast(code), "CpuFeatures::Probe"));
130 typedef uint64_t (*F0)(); 133 typedef uint64_t (*F0)();
131 F0 probe = FUNCTION_CAST<F0>(Code::cast(code)->entry()); 134 F0 probe = FUNCTION_CAST<F0>(Code::cast(code)->entry());
132 supported_ = probe(); 135 supported_ = probe();
133 found_by_runtime_probing_ = supported_; 136 found_by_runtime_probing_ = supported_;
134 found_by_runtime_probing_ &= ~kDefaultCpuFeatures; 137 found_by_runtime_probing_ &= ~kDefaultCpuFeatures;
135 uint64_t os_guarantees = OS::CpuFeaturesImpliedByPlatform(); 138 uint64_t os_guarantees = OS::CpuFeaturesImpliedByPlatform();
136 supported_ |= os_guarantees; 139 supported_ |= os_guarantees;
137 found_by_runtime_probing_ &= portable ? ~os_guarantees : 0; 140 found_by_runtime_probing_ &= portable ? ~os_guarantees : 0;
138 // SSE2 and CMOV must be available on an X64 CPU. 141 // SSE2 and CMOV must be available on an X64 CPU.
(...skipping 3020 matching lines...) Expand 10 before | Expand all | Expand 10 after
3159 // specially coded on x64 means that it is a relative 32 bit address, as used 3162 // specially coded on x64 means that it is a relative 32 bit address, as used
3160 // by branch instructions. 3163 // by branch instructions.
3161 return (1 << rmode_) & kApplyMask; 3164 return (1 << rmode_) & kApplyMask;
3162 } 3165 }
3163 3166
3164 3167
3165 3168
3166 } } // namespace v8::internal 3169 } } // namespace v8::internal
3167 3170
3168 #endif // V8_TARGET_ARCH_X64 3171 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/vm-state-inl.h ('k') | src/x64/regexp-macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698