Lines Matching refs:forKernel
77 static int attr_is_valid (int forKernel, const char *attr);
2600 #define VALID_FOR_KERNEL(forKernel) ((forKernel)>=0 && (forKernel)<=1) argument
2601 #define IS_KERNEL(forKernel) ((forKernel)==1) argument
3235 static void hwc_process_raw_ctrs (int forKernel, Hwcentry ***pstd_out,
3414 try_a_counter (int forKernel) in try_a_counter() argument
3416 if (!VALID_FOR_KERNEL (forKernel)) in try_a_counter()
3420 if (cpcx_std[forKernel] == NULL) in try_a_counter()
3427 testevent = cpcx_std[forKernel][0]; in try_a_counter()
3627 process_ctr_def (int forKernel, hrtime_t global_min_time_nsec, in process_ctr_def() argument
3648 pfound = ptrarray_find ((const Hwcentry**) cpcx_std[forKernel], nameOnly, NULL, 1, regno); in process_ctr_def()
3655 pfound = ptrarray_find ((const Hwcentry**) cpcx_hidden[forKernel], nameOnly, NULL, 1, regno); in process_ctr_def()
3661 … pfound = ptrarray_find_by_name (cpcx_raw[forKernel], nameOnly); /* (regno match checked later) */ in process_ctr_def()
3667 pfound = ptrarray_find ((const Hwcentry**) cpcx_std[forKernel], nameOnly, NULL, 1, REGNO_ANY); in process_ctr_def()
3673 … pfound = ptrarray_find ((const Hwcentry**) cpcx_hidden[forKernel], nameOnly, NULL, 1, REGNO_ANY); in process_ctr_def()
3699 (IS_KERNEL (forKernel) ? "er_kernel" : "collect")); in process_ctr_def()
3832 if (!attr_is_valid (forKernel, cpc2_attrs[ii].ca_name)) in process_ctr_def()
3839 (IS_KERNEL (forKernel) ? "er_kernel" : "collect")); in process_ctr_def()
3906 hwc_lookup (int forKernel, hrtime_t global_min_time_nsec, const char *instring, in hwc_lookup() argument
4006 (IS_KERNEL (forKernel) ? "er_kernel" : "collect")); in hwc_lookup()
4027 if (process_ctr_def (forKernel, global_min_time_nsec, counter, value, pret_ctr, in hwc_lookup()
4054 if (numctrs > cpcx_max_concurrent[forKernel]) in hwc_lookup()
4057 …ion could not be loaded: More than %d counters were specified\n"), cpcx_max_concurrent[forKernel]); in hwc_lookup()
4060 (IS_KERNEL (forKernel) ? "er_kernel" : "collect")); in hwc_lookup()
4077 hwc_validate_ctrs (int forKernel, Hwcentry *entries[], unsigned numctrs) in hwc_validate_ctrs() argument
4139 (IS_KERNEL (forKernel) ? "er_kernel" : "collect")); in hwc_validate_ctrs()
4336 hwc_get_default_cntrs2 (int forKernel, int style) in hwc_get_default_cntrs2() argument
4339 if (!VALID_FOR_KERNEL (forKernel)) in hwc_get_default_cntrs2()
4341 char *cpcx_default = cpcx_default_hwcs[forKernel]; in hwc_get_default_cntrs2()
4401 hwc_get_orig_default_cntrs (int forKernel) in hwc_get_orig_default_cntrs() argument
4404 if (!VALID_FOR_KERNEL (forKernel)) in hwc_get_orig_default_cntrs()
4406 if (cpcx_orig_default_hwcs[forKernel] != NULL) in hwc_get_orig_default_cntrs()
4407 return strdup (cpcx_orig_default_hwcs[forKernel]); in hwc_get_orig_default_cntrs()
4625 hwc_get_max_concurrent (int forKernel) in hwc_get_max_concurrent() argument
4628 if (!VALID_FOR_KERNEL (forKernel)) in hwc_get_max_concurrent()
4630 return cpcx_max_concurrent[forKernel]; in hwc_get_max_concurrent()
4634 hwc_get_attrs (int forKernel) in hwc_get_attrs() argument
4637 if (!VALID_FOR_KERNEL (forKernel)) in hwc_get_attrs()
4639 return cpcx_attrs[forKernel]; in hwc_get_attrs()
4643 hwc_get_std_ctrs (int forKernel) in hwc_get_std_ctrs() argument
4646 if (!VALID_FOR_KERNEL (forKernel)) in hwc_get_std_ctrs()
4648 return cpcx_std[forKernel]; in hwc_get_std_ctrs()
4652 hwc_get_raw_ctrs (int forKernel) in hwc_get_raw_ctrs() argument
4655 if (!VALID_FOR_KERNEL (forKernel)) in hwc_get_raw_ctrs()
4657 return cpcx_raw[forKernel]; in hwc_get_raw_ctrs()
4998 hwc_usage_internal (int forKernel, FILE *f_usage, const char *cmd, const char *dataspace_msg, int s… in hwc_usage_internal() argument
5000 if (!VALID_FOR_KERNEL (forKernel)) in hwc_usage_internal()
5004 Hwcentry** raw_ctrs = hwc_get_raw_ctrs (forKernel); in hwc_usage_internal()
5006 Hwcentry** std_ctrs = hwc_get_std_ctrs (forKernel); in hwc_usage_internal()
5008 unsigned hwc_maxregs = hwc_get_max_concurrent (forKernel); in hwc_usage_internal()
5041 if (!IS_KERNEL (forKernel)) in hwc_usage_internal()
5056 char**hwc_attrs = hwc_get_attrs (forKernel); in hwc_usage_internal()
5073 if (cpcx_has_precise[forKernel]) in hwc_usage_internal()
5075 if (!forKernel) in hwc_usage_internal()
5097 if (IS_KERNEL (forKernel)) in hwc_usage_internal()
5142 char * defctrs = hwc_get_default_cntrs2 (forKernel, 1); in hwc_usage_internal()
5147 char *s = hwc_get_orig_default_cntrs (forKernel); in hwc_usage_internal()
5155 char *defctrs2 = hwc_get_default_cntrs2 (forKernel, 2); in hwc_usage_internal()
5197 hwc_usage (int forKernel, const char *cmd, const char *dataspace_msg) in hwc_usage() argument
5199 hwc_usage_internal (forKernel, stdout, cmd, dataspace_msg, 1, 0); in hwc_usage()
5203 hwc_usage_f (int forKernel, FILE *f, const char *cmd, const char *dataspace_msg, int show_syntax, i… in hwc_usage_f() argument
5205 hwc_usage_internal (forKernel, f, cmd, dataspace_msg, show_syntax, show_short_desc); in hwc_usage_f()
5236 hwc_process_raw_ctrs (int forKernel, Hwcentry ***pstd_out, in hwc_process_raw_ctrs() argument
5275 if ((cpcx_support_bitmask & HWCFUNCS_SUPPORT_PEBS_SAMPLING) == 0 || forKernel) in hwc_process_raw_ctrs()
5380 if (forKernel) in hwc_process_raw_ctrs()
5409 if (forKernel) in hwc_process_raw_ctrs()
5441 attr_is_valid (int forKernel, const char *attr) in attr_is_valid() argument
5444 if (!VALID_FOR_KERNEL (forKernel) || !cpcx_attrs[forKernel]) in attr_is_valid()
5446 for (int ii = 0; cpcx_attrs[forKernel][ii]; ii++) in attr_is_valid()
5447 if (strcmp (attr, cpcx_attrs[forKernel][ii]) == 0) in attr_is_valid()