Lines Matching refs:forKernel
77 static int attr_is_valid (int forKernel, const char *attr);
2564 #define VALID_FOR_KERNEL(forKernel) ((forKernel)>=0 && (forKernel)<=1) argument
2565 #define IS_KERNEL(forKernel) ((forKernel)==1) argument
3199 static void hwc_process_raw_ctrs (int forKernel, Hwcentry ***pstd_out,
3378 try_a_counter (int forKernel) in try_a_counter() argument
3380 if (!VALID_FOR_KERNEL (forKernel)) in try_a_counter()
3384 if (cpcx_std[forKernel] == NULL) in try_a_counter()
3391 testevent = cpcx_std[forKernel][0]; in try_a_counter()
3591 process_ctr_def (int forKernel, hrtime_t global_min_time_nsec, in process_ctr_def() argument
3612 pfound = ptrarray_find ((const Hwcentry**) cpcx_std[forKernel], nameOnly, NULL, 1, regno); in process_ctr_def()
3619 pfound = ptrarray_find ((const Hwcentry**) cpcx_hidden[forKernel], nameOnly, NULL, 1, regno); in process_ctr_def()
3625 … pfound = ptrarray_find_by_name (cpcx_raw[forKernel], nameOnly); /* (regno match checked later) */ in process_ctr_def()
3631 pfound = ptrarray_find ((const Hwcentry**) cpcx_std[forKernel], nameOnly, NULL, 1, REGNO_ANY); in process_ctr_def()
3637 … pfound = ptrarray_find ((const Hwcentry**) cpcx_hidden[forKernel], nameOnly, NULL, 1, REGNO_ANY); in process_ctr_def()
3663 (IS_KERNEL (forKernel) ? "er_kernel" : "collect")); in process_ctr_def()
3796 if (!attr_is_valid (forKernel, cpc2_attrs[ii].ca_name)) in process_ctr_def()
3803 (IS_KERNEL (forKernel) ? "er_kernel" : "collect")); in process_ctr_def()
3870 hwc_lookup (int forKernel, hrtime_t global_min_time_nsec, const char *instring, in hwc_lookup() argument
3970 (IS_KERNEL (forKernel) ? "er_kernel" : "collect")); in hwc_lookup()
3991 if (process_ctr_def (forKernel, global_min_time_nsec, counter, value, pret_ctr, in hwc_lookup()
4018 if (numctrs > cpcx_max_concurrent[forKernel]) in hwc_lookup()
4021 …ion could not be loaded: More than %d counters were specified\n"), cpcx_max_concurrent[forKernel]); in hwc_lookup()
4024 (IS_KERNEL (forKernel) ? "er_kernel" : "collect")); in hwc_lookup()
4041 hwc_validate_ctrs (int forKernel, Hwcentry *entries[], unsigned numctrs) in hwc_validate_ctrs() argument
4103 (IS_KERNEL (forKernel) ? "er_kernel" : "collect")); in hwc_validate_ctrs()
4300 hwc_get_default_cntrs2 (int forKernel, int style) in hwc_get_default_cntrs2() argument
4303 if (!VALID_FOR_KERNEL (forKernel)) in hwc_get_default_cntrs2()
4305 char *cpcx_default = cpcx_default_hwcs[forKernel]; in hwc_get_default_cntrs2()
4365 hwc_get_orig_default_cntrs (int forKernel) in hwc_get_orig_default_cntrs() argument
4368 if (!VALID_FOR_KERNEL (forKernel)) in hwc_get_orig_default_cntrs()
4370 if (cpcx_orig_default_hwcs[forKernel] != NULL) in hwc_get_orig_default_cntrs()
4371 return strdup (cpcx_orig_default_hwcs[forKernel]); in hwc_get_orig_default_cntrs()
4589 hwc_get_max_concurrent (int forKernel) in hwc_get_max_concurrent() argument
4592 if (!VALID_FOR_KERNEL (forKernel)) in hwc_get_max_concurrent()
4594 return cpcx_max_concurrent[forKernel]; in hwc_get_max_concurrent()
4598 hwc_get_attrs (int forKernel) in hwc_get_attrs() argument
4601 if (!VALID_FOR_KERNEL (forKernel)) in hwc_get_attrs()
4603 return cpcx_attrs[forKernel]; in hwc_get_attrs()
4607 hwc_get_std_ctrs (int forKernel) in hwc_get_std_ctrs() argument
4610 if (!VALID_FOR_KERNEL (forKernel)) in hwc_get_std_ctrs()
4612 return cpcx_std[forKernel]; in hwc_get_std_ctrs()
4616 hwc_get_raw_ctrs (int forKernel) in hwc_get_raw_ctrs() argument
4619 if (!VALID_FOR_KERNEL (forKernel)) in hwc_get_raw_ctrs()
4621 return cpcx_raw[forKernel]; in hwc_get_raw_ctrs()
4962 hwc_usage_internal (int forKernel, FILE *f_usage, const char *cmd, const char *dataspace_msg, int s… in hwc_usage_internal() argument
4964 if (!VALID_FOR_KERNEL (forKernel)) in hwc_usage_internal()
4968 Hwcentry** raw_ctrs = hwc_get_raw_ctrs (forKernel); in hwc_usage_internal()
4970 Hwcentry** std_ctrs = hwc_get_std_ctrs (forKernel); in hwc_usage_internal()
4972 unsigned hwc_maxregs = hwc_get_max_concurrent (forKernel); in hwc_usage_internal()
5005 if (!IS_KERNEL (forKernel)) in hwc_usage_internal()
5020 char**hwc_attrs = hwc_get_attrs (forKernel); in hwc_usage_internal()
5037 if (cpcx_has_precise[forKernel]) in hwc_usage_internal()
5039 if (!forKernel) in hwc_usage_internal()
5061 if (IS_KERNEL (forKernel)) in hwc_usage_internal()
5106 char * defctrs = hwc_get_default_cntrs2 (forKernel, 1); in hwc_usage_internal()
5111 char *s = hwc_get_orig_default_cntrs (forKernel); in hwc_usage_internal()
5119 char *defctrs2 = hwc_get_default_cntrs2 (forKernel, 2); in hwc_usage_internal()
5161 hwc_usage (int forKernel, const char *cmd, const char *dataspace_msg) in hwc_usage() argument
5163 hwc_usage_internal (forKernel, stdout, cmd, dataspace_msg, 1, 0); in hwc_usage()
5167 hwc_usage_f (int forKernel, FILE *f, const char *cmd, const char *dataspace_msg, int show_syntax, i… in hwc_usage_f() argument
5169 hwc_usage_internal (forKernel, f, cmd, dataspace_msg, show_syntax, show_short_desc); in hwc_usage_f()
5200 hwc_process_raw_ctrs (int forKernel, Hwcentry ***pstd_out, in hwc_process_raw_ctrs() argument
5239 if ((cpcx_support_bitmask & HWCFUNCS_SUPPORT_PEBS_SAMPLING) == 0 || forKernel) in hwc_process_raw_ctrs()
5344 if (forKernel) in hwc_process_raw_ctrs()
5373 if (forKernel) in hwc_process_raw_ctrs()
5405 attr_is_valid (int forKernel, const char *attr) in attr_is_valid() argument
5408 if (!VALID_FOR_KERNEL (forKernel) || !cpcx_attrs[forKernel]) in attr_is_valid()
5410 for (int ii = 0; cpcx_attrs[forKernel][ii]; ii++) in attr_is_valid()
5411 if (strcmp (attr, cpcx_attrs[forKernel][ii]) == 0) in attr_is_valid()