Lines Matching defs:fd2

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