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

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 16286016: Notify CPU profiler when calling native getters (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed check that pthread_kill always succeeds Created 7 years, 6 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/simulator-arm.cc ('k') | src/assembler.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 bool returns_handle = 949 bool returns_handle =
950 !CallbackTable::ReturnsVoid(masm->isolate(), function_address); 950 !CallbackTable::ReturnsVoid(masm->isolate(), function_address);
951 ApiFunction fun(function_address); 951 ApiFunction fun(function_address);
952 ExternalReference::Type type = 952 ExternalReference::Type type =
953 returns_handle ? 953 returns_handle ?
954 ExternalReference::DIRECT_API_CALL : 954 ExternalReference::DIRECT_API_CALL :
955 ExternalReference::DIRECT_API_CALL_NEW; 955 ExternalReference::DIRECT_API_CALL_NEW;
956 ExternalReference ref = ExternalReference(&fun, 956 ExternalReference ref = ExternalReference(&fun,
957 type, 957 type,
958 masm->isolate()); 958 masm->isolate());
959 Address thunk_address = returns_handle
960 ? FUNCTION_ADDR(&InvokeInvocationCallback)
961 : FUNCTION_ADDR(&InvokeFunctionCallback);
962 ExternalReference::Type thunk_type =
963 returns_handle ?
964 ExternalReference::PROFILING_API_CALL :
965 ExternalReference::PROFILING_API_CALL_NEW;
966 ApiFunction thunk_fun(thunk_address);
967 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type,
968 masm->isolate());
969
959 AllowExternalCallThatCantCauseGC scope(masm); 970 AllowExternalCallThatCantCauseGC scope(masm);
960 __ CallApiFunctionAndReturn(ref, 971 __ CallApiFunctionAndReturn(ref,
972 function_address,
973 thunk_ref,
974 r1,
961 kStackUnwindSpace, 975 kStackUnwindSpace,
962 returns_handle, 976 returns_handle,
963 kFastApiCallArguments + 1); 977 kFastApiCallArguments + 1);
964 } 978 }
965 979
966 980
967 class CallInterceptorCompiler BASE_EMBEDDED { 981 class CallInterceptorCompiler BASE_EMBEDDED {
968 public: 982 public:
969 CallInterceptorCompiler(StubCompiler* stub_compiler, 983 CallInterceptorCompiler(StubCompiler* stub_compiler,
970 const ParameterCount& arguments, 984 const ParameterCount& arguments,
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 1461
1448 // Create AccessorInfo instance on the stack above the exit frame with 1462 // Create AccessorInfo instance on the stack above the exit frame with
1449 // scratch2 (internal::Object** args_) as the data. 1463 // scratch2 (internal::Object** args_) as the data.
1450 __ str(scratch2(), MemOperand(sp, 1 * kPointerSize)); 1464 __ str(scratch2(), MemOperand(sp, 1 * kPointerSize));
1451 __ add(r1, sp, Operand(1 * kPointerSize)); // r1 = AccessorInfo& 1465 __ add(r1, sp, Operand(1 * kPointerSize)); // r1 = AccessorInfo&
1452 1466
1453 const int kStackUnwindSpace = kFastApiCallArguments + 1; 1467 const int kStackUnwindSpace = kFastApiCallArguments + 1;
1454 Address getter_address = v8::ToCData<Address>(callback->getter()); 1468 Address getter_address = v8::ToCData<Address>(callback->getter());
1455 bool returns_handle = 1469 bool returns_handle =
1456 !CallbackTable::ReturnsVoid(isolate(), getter_address); 1470 !CallbackTable::ReturnsVoid(isolate(), getter_address);
1471
1457 ApiFunction fun(getter_address); 1472 ApiFunction fun(getter_address);
1458 ExternalReference::Type type = 1473 ExternalReference::Type type =
1459 returns_handle ? 1474 returns_handle ?
1460 ExternalReference::DIRECT_GETTER_CALL : 1475 ExternalReference::DIRECT_GETTER_CALL :
1461 ExternalReference::DIRECT_GETTER_CALL_NEW; 1476 ExternalReference::DIRECT_GETTER_CALL_NEW;
1477 ExternalReference ref = ExternalReference(&fun, type, isolate());
1462 1478
1463 ExternalReference ref = ExternalReference(&fun, type, isolate()); 1479 Address thunk_address = returns_handle
1480 ? FUNCTION_ADDR(&InvokeAccessorGetter)
1481 : FUNCTION_ADDR(&InvokeAccessorGetterCallback);
1482 ExternalReference::Type thunk_type =
1483 returns_handle ?
1484 ExternalReference::PROFILING_GETTER_CALL :
1485 ExternalReference::PROFILING_GETTER_CALL_NEW;
1486 ApiFunction thunk_fun(thunk_address);
1487 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type,
1488 isolate());
1464 __ CallApiFunctionAndReturn(ref, 1489 __ CallApiFunctionAndReturn(ref,
1490 getter_address,
1491 thunk_ref,
1492 r2,
1465 kStackUnwindSpace, 1493 kStackUnwindSpace,
1466 returns_handle, 1494 returns_handle,
1467 5); 1495 5);
1468 } 1496 }
1469 1497
1470 1498
1471 void BaseLoadStubCompiler::GenerateLoadInterceptor( 1499 void BaseLoadStubCompiler::GenerateLoadInterceptor(
1472 Register holder_reg, 1500 Register holder_reg,
1473 Handle<JSObject> object, 1501 Handle<JSObject> object,
1474 Handle<JSObject> interceptor_holder, 1502 Handle<JSObject> interceptor_holder,
(...skipping 2162 matching lines...) Expand 10 before | Expand all | Expand 10 after
3637 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); 3665 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow);
3638 } 3666 }
3639 } 3667 }
3640 3668
3641 3669
3642 #undef __ 3670 #undef __
3643 3671
3644 } } // namespace v8::internal 3672 } } // namespace v8::internal
3645 3673
3646 #endif // V8_TARGET_ARCH_ARM 3674 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698