| 2738 | } |
| 2739 | |
| 2740 | static int |
| 2741 | prof_reset_ctl(tsd_t *tsd, const size_t *mib, size_t miblen, |
| 2742 | void *oldp, size_t *oldlenp, void *newp, size_t newlen) { |
| 2743 | int ret; |
| 2744 | size_t lg_sample = lg_prof_sample; |
| 2745 | |
| 2746 | if (!config_prof) { |
| 2747 | return ENOENT; |
| 2748 | } |
| 2749 | |
| 2750 | WRITEONLY(); |
| 2751 | WRITE(lg_sample, size_t); |
| 2752 | if (lg_sample >= (sizeof(uint64_t) << 3)) { |
| 2753 | lg_sample = (sizeof(uint64_t) << 3) - 1; |
| 2754 | } |
| 2755 | |
| 2756 | prof_reset(tsd, lg_sample); |
| 2757 | |
| 2758 | ret = 0; |
| 2759 | label_return: |
| 2760 | return ret; |
| 2761 | } |
| 2762 | |
| 2763 | CTL_RO_NL_CGEN(config_prof, prof_interval, prof_interval, uint64_t) |
| 2764 | CTL_RO_NL_CGEN(config_prof, lg_prof_sample, lg_prof_sample, size_t) |
nothing calls this directly
no test coverage detected