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

Side by Side Diff: src/runtime/runtime-internal.cc

Issue 1031383002: Add %_IncrementStatsCounter intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | « src/runtime/runtime.h ('k') | test/cctest/compiler/test-run-intrinsics.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/debug.h" 9 #include "src/debug.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } 311 }
312 312
313 313
314 RUNTIME_FUNCTION(Runtime_GetFromCache) { 314 RUNTIME_FUNCTION(Runtime_GetFromCache) {
315 HandleScope scope(isolate); 315 HandleScope scope(isolate);
316 DCHECK(args.length() == 2); 316 DCHECK(args.length() == 2);
317 CONVERT_SMI_ARG_CHECKED(id, 0); 317 CONVERT_SMI_ARG_CHECKED(id, 0);
318 args[0] = isolate->native_context()->jsfunction_result_caches()->get(id); 318 args[0] = isolate->native_context()->jsfunction_result_caches()->get(id);
319 return __RT_impl_Runtime_GetFromCacheRT(args, isolate); 319 return __RT_impl_Runtime_GetFromCacheRT(args, isolate);
320 } 320 }
321
322
323 RUNTIME_FUNCTION(Runtime_IncrementStatsCounter) {
324 SealHandleScope shs(isolate);
325 DCHECK(args.length() == 1);
326 CONVERT_ARG_CHECKED(String, name, 0);
327
328 if (FLAG_native_code_counters) {
329 StatsCounter(isolate, name->ToCString().get()).Increment();
330 }
331 return isolate->heap()->undefined_value();
332 }
321 } 333 }
322 } // namespace v8::internal 334 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/compiler/test-run-intrinsics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698