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

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

Issue 11411224: Also time external callbacks from generated code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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/log.cc ('k') | no next file » | 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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 ExternalReference::scheduled_exception_address(isolate()); 713 ExternalReference::scheduled_exception_address(isolate());
714 714
715 // Allocate HandleScope in callee-save registers. 715 // Allocate HandleScope in callee-save registers.
716 Register prev_next_address_reg = r14; 716 Register prev_next_address_reg = r14;
717 Register prev_limit_reg = rbx; 717 Register prev_limit_reg = rbx;
718 Register base_reg = r15; 718 Register base_reg = r15;
719 movq(base_reg, next_address); 719 movq(base_reg, next_address);
720 movq(prev_next_address_reg, Operand(base_reg, kNextOffset)); 720 movq(prev_next_address_reg, Operand(base_reg, kNextOffset));
721 movq(prev_limit_reg, Operand(base_reg, kLimitOffset)); 721 movq(prev_limit_reg, Operand(base_reg, kLimitOffset));
722 addl(Operand(base_reg, kLevelOffset), Immediate(1)); 722 addl(Operand(base_reg, kLevelOffset), Immediate(1));
723
724 if (FLAG_log_timer_events) {
725 FrameScope frame(this, StackFrame::MANUAL);
726 PushSafepointRegisters();
727 PrepareCallCFunction(0);
728 CallCFunction(ExternalReference::log_enter_external_function(isolate()), 0);
729 PopSafepointRegisters();
730 }
731
723 // Call the api function! 732 // Call the api function!
724 movq(rax, reinterpret_cast<int64_t>(function_address), 733 movq(rax, reinterpret_cast<int64_t>(function_address),
725 RelocInfo::RUNTIME_ENTRY); 734 RelocInfo::RUNTIME_ENTRY);
726 call(rax); 735 call(rax);
727 736
737 if (FLAG_log_timer_events) {
738 FrameScope frame(this, StackFrame::MANUAL);
739 PushSafepointRegisters();
740 PrepareCallCFunction(0);
741 CallCFunction(ExternalReference::log_leave_external_function(isolate()), 0);
742 PopSafepointRegisters();
743 }
744
728 #if defined(_WIN64) && !defined(__MINGW64__) 745 #if defined(_WIN64) && !defined(__MINGW64__)
729 // rax keeps a pointer to v8::Handle, unpack it. 746 // rax keeps a pointer to v8::Handle, unpack it.
730 movq(rax, Operand(rax, 0)); 747 movq(rax, Operand(rax, 0));
731 #endif 748 #endif
732 // Check if the result handle holds 0. 749 // Check if the result handle holds 0.
733 testq(rax, rax); 750 testq(rax, rax);
734 j(zero, &empty_result); 751 j(zero, &empty_result);
735 // It was non-zero. Dereference to get the result value. 752 // It was non-zero. Dereference to get the result value.
736 movq(rax, Operand(rax, 0)); 753 movq(rax, Operand(rax, 0));
737 bind(&prologue); 754 bind(&prologue);
(...skipping 3830 matching lines...) Expand 10 before | Expand all | Expand 10 after
4568 4585
4569 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); 4586 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset));
4570 cmpq(rcx, null_value); 4587 cmpq(rcx, null_value);
4571 j(not_equal, &next); 4588 j(not_equal, &next);
4572 } 4589 }
4573 4590
4574 4591
4575 } } // namespace v8::internal 4592 } } // namespace v8::internal
4576 4593
4577 #endif // V8_TARGET_ARCH_X64 4594 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/log.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698