Lines Matching refs:fd1
360 int fd1, fd2; in test_process_multi_diff_addr() local
364 fd1 = perf_process_event_open(HW_BREAKPOINT_RW, (__u64)&a, (__u64)sizeof(a)); in test_process_multi_diff_addr()
365 if (fd1 < 0) { in test_process_multi_diff_addr()
372 close(fd1); in test_process_multi_diff_addr()
377 ioctl(fd1, PERF_EVENT_IOC_RESET); in test_process_multi_diff_addr()
379 ioctl(fd1, PERF_EVENT_IOC_ENABLE); in test_process_multi_diff_addr()
382 ioctl(fd1, PERF_EVENT_IOC_DISABLE); in test_process_multi_diff_addr()
385 res = read(fd1, &breaks1, sizeof(breaks1)); in test_process_multi_diff_addr()
390 close(fd1); in test_process_multi_diff_addr()
405 int fd1, fd2; in test_process_multi_same_addr() local
409 fd1 = perf_process_event_open(HW_BREAKPOINT_RW, (__u64)&a, (__u64)sizeof(a)); in test_process_multi_same_addr()
410 if (fd1 < 0) { in test_process_multi_same_addr()
417 close(fd1); in test_process_multi_same_addr()
422 ioctl(fd1, PERF_EVENT_IOC_RESET); in test_process_multi_same_addr()
424 ioctl(fd1, PERF_EVENT_IOC_ENABLE); in test_process_multi_same_addr()
427 ioctl(fd1, PERF_EVENT_IOC_DISABLE); in test_process_multi_same_addr()
430 res = read(fd1, &breaks1, sizeof(breaks1)); in test_process_multi_same_addr()
435 close(fd1); in test_process_multi_same_addr()
450 int fd1, fd2; in test_process_multi_diff_addr_ro_wo() local
454 fd1 = perf_process_event_open(HW_BREAKPOINT_W, (__u64)&a, (__u64)sizeof(a)); in test_process_multi_diff_addr_ro_wo()
455 if (fd1 < 0) { in test_process_multi_diff_addr_ro_wo()
462 close(fd1); in test_process_multi_diff_addr_ro_wo()
467 ioctl(fd1, PERF_EVENT_IOC_RESET); in test_process_multi_diff_addr_ro_wo()
469 ioctl(fd1, PERF_EVENT_IOC_ENABLE); in test_process_multi_diff_addr_ro_wo()
472 ioctl(fd1, PERF_EVENT_IOC_DISABLE); in test_process_multi_diff_addr_ro_wo()
475 res = read(fd1, &breaks1, sizeof(breaks1)); in test_process_multi_diff_addr_ro_wo()
480 close(fd1); in test_process_multi_diff_addr_ro_wo()
495 int fd1, fd2; in test_process_multi_same_addr_ro_wo() local
499 fd1 = perf_process_event_open(HW_BREAKPOINT_R, (__u64)&a, (__u64)sizeof(a)); in test_process_multi_same_addr_ro_wo()
500 if (fd1 < 0) { in test_process_multi_same_addr_ro_wo()
507 close(fd1); in test_process_multi_same_addr_ro_wo()
512 ioctl(fd1, PERF_EVENT_IOC_RESET); in test_process_multi_same_addr_ro_wo()
514 ioctl(fd1, PERF_EVENT_IOC_ENABLE); in test_process_multi_same_addr_ro_wo()
517 ioctl(fd1, PERF_EVENT_IOC_DISABLE); in test_process_multi_same_addr_ro_wo()
520 res = read(fd1, &breaks1, sizeof(breaks1)); in test_process_multi_same_addr_ro_wo()
525 close(fd1); in test_process_multi_same_addr_ro_wo()
540 int *fd1 = malloc(nprocs * sizeof(int)); in test_syswide_multi_diff_addr() local
545 ret = perf_systemwide_event_open(fd1, HW_BREAKPOINT_RW, (__u64)&a, (__u64)sizeof(a)); in test_syswide_multi_diff_addr()
553 close_fds(fd1, nprocs); in test_syswide_multi_diff_addr()
558 reset_fds(fd1, nprocs); in test_syswide_multi_diff_addr()
560 enable_fds(fd1, nprocs); in test_syswide_multi_diff_addr()
563 disable_fds(fd1, nprocs); in test_syswide_multi_diff_addr()
566 breaks1 = read_fds(fd1, nprocs); in test_syswide_multi_diff_addr()
569 close_fds(fd1, nprocs); in test_syswide_multi_diff_addr()
572 free(fd1); in test_syswide_multi_diff_addr()
587 int *fd1 = malloc(nprocs * sizeof(int)); in test_syswide_multi_same_addr() local
592 ret = perf_systemwide_event_open(fd1, HW_BREAKPOINT_RW, (__u64)&a, (__u64)sizeof(a)); in test_syswide_multi_same_addr()
600 close_fds(fd1, nprocs); in test_syswide_multi_same_addr()
605 reset_fds(fd1, nprocs); in test_syswide_multi_same_addr()
607 enable_fds(fd1, nprocs); in test_syswide_multi_same_addr()
610 disable_fds(fd1, nprocs); in test_syswide_multi_same_addr()
613 breaks1 = read_fds(fd1, nprocs); in test_syswide_multi_same_addr()
616 close_fds(fd1, nprocs); in test_syswide_multi_same_addr()
619 free(fd1); in test_syswide_multi_same_addr()
634 int *fd1 = malloc(nprocs * sizeof(int)); in test_syswide_multi_diff_addr_ro_wo() local
639 ret = perf_systemwide_event_open(fd1, HW_BREAKPOINT_W, (__u64)&a, (__u64)sizeof(a)); in test_syswide_multi_diff_addr_ro_wo()
647 close_fds(fd1, nprocs); in test_syswide_multi_diff_addr_ro_wo()
652 reset_fds(fd1, nprocs); in test_syswide_multi_diff_addr_ro_wo()
654 enable_fds(fd1, nprocs); in test_syswide_multi_diff_addr_ro_wo()
657 disable_fds(fd1, nprocs); in test_syswide_multi_diff_addr_ro_wo()
660 breaks1 = read_fds(fd1, nprocs); in test_syswide_multi_diff_addr_ro_wo()
663 close_fds(fd1, nprocs); in test_syswide_multi_diff_addr_ro_wo()
666 free(fd1); in test_syswide_multi_diff_addr_ro_wo()
681 int *fd1 = malloc(nprocs * sizeof(int)); in test_syswide_multi_same_addr_ro_wo() local
686 ret = perf_systemwide_event_open(fd1, HW_BREAKPOINT_W, (__u64)&a, (__u64)sizeof(a)); in test_syswide_multi_same_addr_ro_wo()
694 close_fds(fd1, nprocs); in test_syswide_multi_same_addr_ro_wo()
699 reset_fds(fd1, nprocs); in test_syswide_multi_same_addr_ro_wo()
701 enable_fds(fd1, nprocs); in test_syswide_multi_same_addr_ro_wo()
704 disable_fds(fd1, nprocs); in test_syswide_multi_same_addr_ro_wo()
707 breaks1 = read_fds(fd1, nprocs); in test_syswide_multi_same_addr_ro_wo()
710 close_fds(fd1, nprocs); in test_syswide_multi_same_addr_ro_wo()
713 free(fd1); in test_syswide_multi_same_addr_ro_wo()