OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/arm64/instrument-arm64.h" | 5 #include "src/arm64/instrument-arm64.h" |
6 | 6 |
7 namespace v8 { | 7 namespace v8 { |
8 namespace internal { | 8 namespace internal { |
9 | 9 |
10 Counter::Counter(const char* name, CounterType type) | 10 Counter::Counter(const char* name, CounterType type) |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 counter->Increment(); | 370 counter->Increment(); |
371 } | 371 } |
372 | 372 |
373 | 373 |
374 void Instrument::InstrumentLoadStore(Instruction* instr) { | 374 void Instrument::InstrumentLoadStore(Instruction* instr) { |
375 static Counter* load_int_counter = GetCounter("Load Integer"); | 375 static Counter* load_int_counter = GetCounter("Load Integer"); |
376 static Counter* store_int_counter = GetCounter("Store Integer"); | 376 static Counter* store_int_counter = GetCounter("Store Integer"); |
377 static Counter* load_fp_counter = GetCounter("Load FP"); | 377 static Counter* load_fp_counter = GetCounter("Load FP"); |
378 static Counter* store_fp_counter = GetCounter("Store FP"); | 378 static Counter* store_fp_counter = GetCounter("Store FP"); |
379 | 379 |
380 switch (instr->Mask(LoadStoreMask)) { | 380 switch (instr->Mask(LoadStoreOpMask)) { |
381 case STRB_w: // Fall through. | 381 case STRB_w: // Fall through. |
382 case STRH_w: // Fall through. | 382 case STRH_w: // Fall through. |
383 case STR_w: // Fall through. | 383 case STR_w: // Fall through. |
384 case STR_x: store_int_counter->Increment(); break; | 384 case STR_x: store_int_counter->Increment(); break; |
385 case STR_s: // Fall through. | 385 case STR_s: // Fall through. |
386 case STR_d: store_fp_counter->Increment(); break; | 386 case STR_d: store_fp_counter->Increment(); break; |
387 case LDRB_w: // Fall through. | 387 case LDRB_w: // Fall through. |
388 case LDRH_w: // Fall through. | 388 case LDRH_w: // Fall through. |
389 case LDR_w: // Fall through. | 389 case LDR_w: // Fall through. |
390 case LDR_x: // Fall through. | 390 case LDR_x: // Fall through. |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 counter->Increment(); | 588 counter->Increment(); |
589 } | 589 } |
590 | 590 |
591 | 591 |
592 void Instrument::VisitFPFixedPointConvert(Instruction* instr) { | 592 void Instrument::VisitFPFixedPointConvert(Instruction* instr) { |
593 Update(); | 593 Update(); |
594 static Counter* counter = GetCounter("FP DP"); | 594 static Counter* counter = GetCounter("FP DP"); |
595 counter->Increment(); | 595 counter->Increment(); |
596 } | 596 } |
597 | 597 |
598 void Instrument::VisitNEON2RegMisc(Instruction* instr) { | |
599 USE(instr); | |
600 Update(); | |
601 static Counter* counter = GetCounter("NEON"); | |
602 counter->Increment(); | |
603 } | |
604 | |
605 void Instrument::VisitNEON3Different(Instruction* instr) { | |
606 USE(instr); | |
607 Update(); | |
608 static Counter* counter = GetCounter("NEON"); | |
609 counter->Increment(); | |
610 } | |
611 | |
612 void Instrument::VisitNEON3Same(Instruction* instr) { | |
613 USE(instr); | |
614 Update(); | |
615 static Counter* counter = GetCounter("NEON"); | |
616 counter->Increment(); | |
617 } | |
618 | |
619 void Instrument::VisitNEONAcrossLanes(Instruction* instr) { | |
620 USE(instr); | |
621 Update(); | |
622 static Counter* counter = GetCounter("NEON"); | |
623 counter->Increment(); | |
624 } | |
625 | |
626 void Instrument::VisitNEONByIndexedElement(Instruction* instr) { | |
627 USE(instr); | |
628 Update(); | |
629 static Counter* counter = GetCounter("NEON"); | |
630 counter->Increment(); | |
631 } | |
632 | |
633 void Instrument::VisitNEONCopy(Instruction* instr) { | |
634 USE(instr); | |
635 Update(); | |
636 static Counter* counter = GetCounter("NEON"); | |
637 counter->Increment(); | |
638 } | |
639 | |
640 void Instrument::VisitNEONExtract(Instruction* instr) { | |
641 USE(instr); | |
642 Update(); | |
643 static Counter* counter = GetCounter("NEON"); | |
644 counter->Increment(); | |
645 } | |
646 | |
647 void Instrument::VisitNEONLoadStoreMultiStruct(Instruction* instr) { | |
648 USE(instr); | |
649 Update(); | |
650 static Counter* counter = GetCounter("NEON"); | |
651 counter->Increment(); | |
652 } | |
653 | |
654 void Instrument::VisitNEONLoadStoreMultiStructPostIndex(Instruction* instr) { | |
655 USE(instr); | |
656 Update(); | |
657 static Counter* counter = GetCounter("NEON"); | |
658 counter->Increment(); | |
659 } | |
660 | |
661 void Instrument::VisitNEONLoadStoreSingleStruct(Instruction* instr) { | |
662 USE(instr); | |
663 Update(); | |
664 static Counter* counter = GetCounter("NEON"); | |
665 counter->Increment(); | |
666 } | |
667 | |
668 void Instrument::VisitNEONLoadStoreSingleStructPostIndex(Instruction* instr) { | |
669 USE(instr); | |
670 Update(); | |
671 static Counter* counter = GetCounter("NEON"); | |
672 counter->Increment(); | |
673 } | |
674 | |
675 void Instrument::VisitNEONModifiedImmediate(Instruction* instr) { | |
676 USE(instr); | |
677 Update(); | |
678 static Counter* counter = GetCounter("NEON"); | |
679 counter->Increment(); | |
680 } | |
681 | |
682 void Instrument::VisitNEONPerm(Instruction* instr) { | |
683 USE(instr); | |
684 Update(); | |
685 static Counter* counter = GetCounter("NEON"); | |
686 counter->Increment(); | |
687 } | |
688 | |
689 void Instrument::VisitNEONScalar2RegMisc(Instruction* instr) { | |
690 USE(instr); | |
691 Update(); | |
692 static Counter* counter = GetCounter("NEON"); | |
693 counter->Increment(); | |
694 } | |
695 | |
696 void Instrument::VisitNEONScalar3Diff(Instruction* instr) { | |
697 USE(instr); | |
698 Update(); | |
699 static Counter* counter = GetCounter("NEON"); | |
700 counter->Increment(); | |
701 } | |
702 | |
703 void Instrument::VisitNEONScalar3Same(Instruction* instr) { | |
704 USE(instr); | |
705 Update(); | |
706 static Counter* counter = GetCounter("NEON"); | |
707 counter->Increment(); | |
708 } | |
709 | |
710 void Instrument::VisitNEONScalarByIndexedElement(Instruction* instr) { | |
711 USE(instr); | |
712 Update(); | |
713 static Counter* counter = GetCounter("NEON"); | |
714 counter->Increment(); | |
715 } | |
716 | |
717 void Instrument::VisitNEONScalarCopy(Instruction* instr) { | |
718 USE(instr); | |
719 Update(); | |
720 static Counter* counter = GetCounter("NEON"); | |
721 counter->Increment(); | |
722 } | |
723 | |
724 void Instrument::VisitNEONScalarPairwise(Instruction* instr) { | |
725 USE(instr); | |
726 Update(); | |
727 static Counter* counter = GetCounter("NEON"); | |
728 counter->Increment(); | |
729 } | |
730 | |
731 void Instrument::VisitNEONScalarShiftImmediate(Instruction* instr) { | |
732 USE(instr); | |
733 Update(); | |
734 static Counter* counter = GetCounter("NEON"); | |
735 counter->Increment(); | |
736 } | |
737 | |
738 void Instrument::VisitNEONShiftImmediate(Instruction* instr) { | |
739 USE(instr); | |
740 Update(); | |
741 static Counter* counter = GetCounter("NEON"); | |
742 counter->Increment(); | |
743 } | |
744 | |
745 void Instrument::VisitNEONTable(Instruction* instr) { | |
746 USE(instr); | |
747 Update(); | |
748 static Counter* counter = GetCounter("NEON"); | |
749 counter->Increment(); | |
750 } | |
751 | 598 |
752 void Instrument::VisitUnallocated(Instruction* instr) { | 599 void Instrument::VisitUnallocated(Instruction* instr) { |
753 Update(); | 600 Update(); |
754 static Counter* counter = GetCounter("Other"); | 601 static Counter* counter = GetCounter("Other"); |
755 counter->Increment(); | 602 counter->Increment(); |
756 } | 603 } |
757 | 604 |
758 | 605 |
759 void Instrument::VisitUnimplemented(Instruction* instr) { | 606 void Instrument::VisitUnimplemented(Instruction* instr) { |
760 Update(); | 607 Update(); |
761 static Counter* counter = GetCounter("Other"); | 608 static Counter* counter = GetCounter("Other"); |
762 counter->Increment(); | 609 counter->Increment(); |
763 } | 610 } |
764 | 611 |
765 | 612 |
766 } // namespace internal | 613 } // namespace internal |
767 } // namespace v8 | 614 } // namespace v8 |
OLD | NEW |