Lines Matching refs:fd2

406 	int fd1, fd2;  in test_process_multi_diff_addr()  local
416 fd2 = perf_process_event_open(HW_BREAKPOINT_RW, (__u64)&b, (__u64)sizeof(b)); in test_process_multi_diff_addr()
417 if (fd2 < 0) { in test_process_multi_diff_addr()
424 ioctl(fd2, PERF_EVENT_IOC_RESET); in test_process_multi_diff_addr()
426 ioctl(fd2, PERF_EVENT_IOC_ENABLE); in test_process_multi_diff_addr()
429 ioctl(fd2, PERF_EVENT_IOC_DISABLE); in test_process_multi_diff_addr()
433 res = read(fd2, &breaks2, sizeof(breaks2)); in test_process_multi_diff_addr()
437 close(fd2); in test_process_multi_diff_addr()
451 int fd1, fd2; in test_process_multi_same_addr() local
461 fd2 = perf_process_event_open(HW_BREAKPOINT_RW, (__u64)&a, (__u64)sizeof(a)); in test_process_multi_same_addr()
462 if (fd2 < 0) { in test_process_multi_same_addr()
469 ioctl(fd2, PERF_EVENT_IOC_RESET); in test_process_multi_same_addr()
471 ioctl(fd2, PERF_EVENT_IOC_ENABLE); in test_process_multi_same_addr()
474 ioctl(fd2, PERF_EVENT_IOC_DISABLE); in test_process_multi_same_addr()
478 res = read(fd2, &breaks2, sizeof(breaks2)); in test_process_multi_same_addr()
482 close(fd2); in test_process_multi_same_addr()
496 int fd1, fd2; in test_process_multi_diff_addr_ro_wo() local
506 fd2 = perf_process_event_open(HW_BREAKPOINT_R, (__u64)&b, (__u64)sizeof(b)); in test_process_multi_diff_addr_ro_wo()
507 if (fd2 < 0) { in test_process_multi_diff_addr_ro_wo()
514 ioctl(fd2, PERF_EVENT_IOC_RESET); in test_process_multi_diff_addr_ro_wo()
516 ioctl(fd2, PERF_EVENT_IOC_ENABLE); in test_process_multi_diff_addr_ro_wo()
519 ioctl(fd2, PERF_EVENT_IOC_DISABLE); in test_process_multi_diff_addr_ro_wo()
523 res = read(fd2, &breaks2, sizeof(breaks2)); in test_process_multi_diff_addr_ro_wo()
527 close(fd2); in test_process_multi_diff_addr_ro_wo()
541 int fd1, fd2; in test_process_multi_same_addr_ro_wo() local
551 fd2 = perf_process_event_open(HW_BREAKPOINT_W, (__u64)&a, (__u64)sizeof(a)); in test_process_multi_same_addr_ro_wo()
552 if (fd2 < 0) { in test_process_multi_same_addr_ro_wo()
559 ioctl(fd2, PERF_EVENT_IOC_RESET); in test_process_multi_same_addr_ro_wo()
561 ioctl(fd2, PERF_EVENT_IOC_ENABLE); in test_process_multi_same_addr_ro_wo()
564 ioctl(fd2, PERF_EVENT_IOC_DISABLE); in test_process_multi_same_addr_ro_wo()
568 res = read(fd2, &breaks2, sizeof(breaks2)); in test_process_multi_same_addr_ro_wo()
572 close(fd2); in test_process_multi_same_addr_ro_wo()
587 int *fd2 = malloc(nprocs * sizeof(int)); in test_syswide_multi_diff_addr() local
595 ret = perf_systemwide_event_open(fd2, HW_BREAKPOINT_RW, (__u64)&b, (__u64)sizeof(b)); in test_syswide_multi_diff_addr()
602 reset_fds(fd2, nprocs); in test_syswide_multi_diff_addr()
604 enable_fds(fd2, nprocs); in test_syswide_multi_diff_addr()
607 disable_fds(fd2, nprocs); in test_syswide_multi_diff_addr()
610 breaks2 = read_fds(fd2, nprocs); in test_syswide_multi_diff_addr()
613 close_fds(fd2, nprocs); in test_syswide_multi_diff_addr()
616 free(fd2); in test_syswide_multi_diff_addr()
631 int *fd2 = malloc(nprocs * sizeof(int)); in test_syswide_multi_same_addr() local
639 ret = perf_systemwide_event_open(fd2, HW_BREAKPOINT_RW, (__u64)&a, (__u64)sizeof(a)); in test_syswide_multi_same_addr()
646 reset_fds(fd2, nprocs); in test_syswide_multi_same_addr()
648 enable_fds(fd2, nprocs); in test_syswide_multi_same_addr()
651 disable_fds(fd2, nprocs); in test_syswide_multi_same_addr()
654 breaks2 = read_fds(fd2, nprocs); in test_syswide_multi_same_addr()
657 close_fds(fd2, nprocs); in test_syswide_multi_same_addr()
660 free(fd2); in test_syswide_multi_same_addr()
675 int *fd2 = malloc(nprocs * sizeof(int)); in test_syswide_multi_diff_addr_ro_wo() local
683 ret = perf_systemwide_event_open(fd2, HW_BREAKPOINT_R, (__u64)&b, (__u64)sizeof(b)); in test_syswide_multi_diff_addr_ro_wo()
690 reset_fds(fd2, nprocs); in test_syswide_multi_diff_addr_ro_wo()
692 enable_fds(fd2, nprocs); in test_syswide_multi_diff_addr_ro_wo()
695 disable_fds(fd2, nprocs); in test_syswide_multi_diff_addr_ro_wo()
698 breaks2 = read_fds(fd2, nprocs); in test_syswide_multi_diff_addr_ro_wo()
701 close_fds(fd2, nprocs); in test_syswide_multi_diff_addr_ro_wo()
704 free(fd2); in test_syswide_multi_diff_addr_ro_wo()
719 int *fd2 = malloc(nprocs * sizeof(int)); in test_syswide_multi_same_addr_ro_wo() local
727 ret = perf_systemwide_event_open(fd2, HW_BREAKPOINT_R, (__u64)&a, (__u64)sizeof(a)); in test_syswide_multi_same_addr_ro_wo()
734 reset_fds(fd2, nprocs); in test_syswide_multi_same_addr_ro_wo()
736 enable_fds(fd2, nprocs); in test_syswide_multi_same_addr_ro_wo()
739 disable_fds(fd2, nprocs); in test_syswide_multi_same_addr_ro_wo()
742 breaks2 = read_fds(fd2, nprocs); in test_syswide_multi_same_addr_ro_wo()
745 close_fds(fd2, nprocs); in test_syswide_multi_same_addr_ro_wo()
748 free(fd2); in test_syswide_multi_same_addr_ro_wo()