Lines Matching refs:fd1
406 int fd1, fd2; in test_process_multi_diff_addr() local
410 fd1 = perf_process_event_open(HW_BREAKPOINT_RW, (__u64)&a, (__u64)sizeof(a)); in test_process_multi_diff_addr()
411 if (fd1 < 0) { in test_process_multi_diff_addr()
418 close(fd1); in test_process_multi_diff_addr()
423 ioctl(fd1, PERF_EVENT_IOC_RESET); in test_process_multi_diff_addr()
425 ioctl(fd1, PERF_EVENT_IOC_ENABLE); in test_process_multi_diff_addr()
428 ioctl(fd1, PERF_EVENT_IOC_DISABLE); in test_process_multi_diff_addr()
431 res = read(fd1, &breaks1, sizeof(breaks1)); in test_process_multi_diff_addr()
436 close(fd1); in test_process_multi_diff_addr()
451 int fd1, fd2; in test_process_multi_same_addr() local
455 fd1 = perf_process_event_open(HW_BREAKPOINT_RW, (__u64)&a, (__u64)sizeof(a)); in test_process_multi_same_addr()
456 if (fd1 < 0) { in test_process_multi_same_addr()
463 close(fd1); in test_process_multi_same_addr()
468 ioctl(fd1, PERF_EVENT_IOC_RESET); in test_process_multi_same_addr()
470 ioctl(fd1, PERF_EVENT_IOC_ENABLE); in test_process_multi_same_addr()
473 ioctl(fd1, PERF_EVENT_IOC_DISABLE); in test_process_multi_same_addr()
476 res = read(fd1, &breaks1, sizeof(breaks1)); in test_process_multi_same_addr()
481 close(fd1); in test_process_multi_same_addr()
496 int fd1, fd2; in test_process_multi_diff_addr_ro_wo() local
500 fd1 = perf_process_event_open(HW_BREAKPOINT_W, (__u64)&a, (__u64)sizeof(a)); in test_process_multi_diff_addr_ro_wo()
501 if (fd1 < 0) { in test_process_multi_diff_addr_ro_wo()
508 close(fd1); in test_process_multi_diff_addr_ro_wo()
513 ioctl(fd1, PERF_EVENT_IOC_RESET); in test_process_multi_diff_addr_ro_wo()
515 ioctl(fd1, PERF_EVENT_IOC_ENABLE); in test_process_multi_diff_addr_ro_wo()
518 ioctl(fd1, PERF_EVENT_IOC_DISABLE); in test_process_multi_diff_addr_ro_wo()
521 res = read(fd1, &breaks1, sizeof(breaks1)); in test_process_multi_diff_addr_ro_wo()
526 close(fd1); in test_process_multi_diff_addr_ro_wo()
541 int fd1, fd2; in test_process_multi_same_addr_ro_wo() local
545 fd1 = perf_process_event_open(HW_BREAKPOINT_R, (__u64)&a, (__u64)sizeof(a)); in test_process_multi_same_addr_ro_wo()
546 if (fd1 < 0) { in test_process_multi_same_addr_ro_wo()
553 close(fd1); in test_process_multi_same_addr_ro_wo()
558 ioctl(fd1, PERF_EVENT_IOC_RESET); in test_process_multi_same_addr_ro_wo()
560 ioctl(fd1, PERF_EVENT_IOC_ENABLE); in test_process_multi_same_addr_ro_wo()
563 ioctl(fd1, PERF_EVENT_IOC_DISABLE); in test_process_multi_same_addr_ro_wo()
566 res = read(fd1, &breaks1, sizeof(breaks1)); in test_process_multi_same_addr_ro_wo()
571 close(fd1); in test_process_multi_same_addr_ro_wo()
586 int *fd1 = malloc(nprocs * sizeof(int)); in test_syswide_multi_diff_addr() local
591 ret = perf_systemwide_event_open(fd1, HW_BREAKPOINT_RW, (__u64)&a, (__u64)sizeof(a)); in test_syswide_multi_diff_addr()
597 close_fds(fd1, nprocs); in test_syswide_multi_diff_addr()
601 reset_fds(fd1, nprocs); in test_syswide_multi_diff_addr()
603 enable_fds(fd1, nprocs); in test_syswide_multi_diff_addr()
606 disable_fds(fd1, nprocs); in test_syswide_multi_diff_addr()
609 breaks1 = read_fds(fd1, nprocs); in test_syswide_multi_diff_addr()
612 close_fds(fd1, nprocs); in test_syswide_multi_diff_addr()
615 free(fd1); in test_syswide_multi_diff_addr()
630 int *fd1 = malloc(nprocs * sizeof(int)); in test_syswide_multi_same_addr() local
635 ret = perf_systemwide_event_open(fd1, HW_BREAKPOINT_RW, (__u64)&a, (__u64)sizeof(a)); in test_syswide_multi_same_addr()
641 close_fds(fd1, nprocs); in test_syswide_multi_same_addr()
645 reset_fds(fd1, nprocs); in test_syswide_multi_same_addr()
647 enable_fds(fd1, nprocs); in test_syswide_multi_same_addr()
650 disable_fds(fd1, nprocs); in test_syswide_multi_same_addr()
653 breaks1 = read_fds(fd1, nprocs); in test_syswide_multi_same_addr()
656 close_fds(fd1, nprocs); in test_syswide_multi_same_addr()
659 free(fd1); in test_syswide_multi_same_addr()
674 int *fd1 = malloc(nprocs * sizeof(int)); in test_syswide_multi_diff_addr_ro_wo() local
679 ret = perf_systemwide_event_open(fd1, HW_BREAKPOINT_W, (__u64)&a, (__u64)sizeof(a)); in test_syswide_multi_diff_addr_ro_wo()
685 close_fds(fd1, nprocs); in test_syswide_multi_diff_addr_ro_wo()
689 reset_fds(fd1, nprocs); in test_syswide_multi_diff_addr_ro_wo()
691 enable_fds(fd1, nprocs); in test_syswide_multi_diff_addr_ro_wo()
694 disable_fds(fd1, nprocs); in test_syswide_multi_diff_addr_ro_wo()
697 breaks1 = read_fds(fd1, nprocs); in test_syswide_multi_diff_addr_ro_wo()
700 close_fds(fd1, nprocs); in test_syswide_multi_diff_addr_ro_wo()
703 free(fd1); in test_syswide_multi_diff_addr_ro_wo()
718 int *fd1 = malloc(nprocs * sizeof(int)); in test_syswide_multi_same_addr_ro_wo() local
723 ret = perf_systemwide_event_open(fd1, HW_BREAKPOINT_W, (__u64)&a, (__u64)sizeof(a)); in test_syswide_multi_same_addr_ro_wo()
729 close_fds(fd1, nprocs); in test_syswide_multi_same_addr_ro_wo()
733 reset_fds(fd1, nprocs); in test_syswide_multi_same_addr_ro_wo()
735 enable_fds(fd1, nprocs); in test_syswide_multi_same_addr_ro_wo()
738 disable_fds(fd1, nprocs); in test_syswide_multi_same_addr_ro_wo()
741 breaks1 = read_fds(fd1, nprocs); in test_syswide_multi_same_addr_ro_wo()
744 close_fds(fd1, nprocs); in test_syswide_multi_same_addr_ro_wo()
747 free(fd1); in test_syswide_multi_same_addr_ro_wo()