• Home
  • Raw
  • Download

Lines Matching full:sampling

3  * Performance event support for the System z CPU-measurement Sampling Facility
27 * At least one table is required for the sampling buffer structure.
48 /* Minimum and maximum sampling buffer sizes:
50 * This number represents the maximum size of the sampling buffer taking
52 * numbers apply to the basic-sampling function only.
54 * the diagnostic-sampling function is active.
56 * Sampling buffer size Buffer characteristics
88 /* CPU-measurement sampling information block */
90 /* CPU-measurement sampling control block */
92 struct sf_buffer sfb; /* Sampling buffer */
103 * sf_disable() - Switch off sampling facility
114 * sf_buffer_available() - Check for an allocated sampling buffer
122 * deallocate sampling facility buffer
145 /* If the origin is reached, sampling buffer is freed */ in free_sampling_buffer()
185 * Allocates new sample-data-blocks and adds them to the specified sampling
188 * Important: This modifies the sampling buffer and must be called when the
189 * sampling facility is disabled.
205 /* Append to the existing sampling buffer, overwriting the table-link in realloc_sampling_buffer()
213 * the sampling buffer origin. in realloc_sampling_buffer()
217 "sampling buffer is not linked: origin %#lx" in realloc_sampling_buffer()
265 /* Link sampling buffer to its origin */ in realloc_sampling_buffer()
278 * Allocates and initializes a sampling buffer structure using the
379 /* Calculate sampling buffers using 4K pages in allocate_buffers()
381 * 1. The sampling size is 32 bytes for basic sampling. This size in allocate_buffers()
383 * sampling uses auxlilary data buffer setup which provides the in allocate_buffers()
397 * 3. Use the sampling frequency as input. in allocate_buffers()
400 * SDBs to handle a higher sampling rate. in allocate_buffers()
412 /* If there is already a sampling buffer allocated, it is very likely in allocate_buffers()
413 * that the sampling facility is enabled too. If the event to be in allocate_buffers()
414 * initialized requires a greater sampling buffer, the allocation must in allocate_buffers()
415 * be postponed. Changing the sampling buffer requires the sampling in allocate_buffers()
442 /* Use a percentage-based approach to extend the sampling facility in compute_sfb_extent()
491 /* extend_sampling_buffer() - Extend sampling buffer
492 * @sfb: Sampling buffer structure (for local CPU)
495 * Use this function to extend the sampling buffer based on the overflow counter
498 * Important: This function disables the sampling facility in order to safely
499 * change the sampling buffer structure. Do not call this function
513 /* Disable the sampling facility to reset any states and also in extend_sampling_buffer()
518 /* Extend the sampling buffer. in extend_sampling_buffer()
558 pr_err("Switching off the sampling facility failed " in setup_pmc_cpu()
568 pr_err("Switching off the sampling facility failed " in setup_pmc_cpu()
667 * Obtain the PID from the basic-sampling data entry and in cpumsf_output_event_pid()
698 /* The min/max sampling rates specifies the valid range in getrate()
706 * sampling rate does not exceed this value. This also helps in getrate()
713 "Sampling rate exceeds maximum " in getrate()
721 /* The sampling information (si) contains information about the
722 * min/max sampling intervals and the CPU speed. So calculate the
723 * correct sampling interval and avoid the whole period adjust
726 * Since the CPU Measurement sampling facility can not handle frequency
727 * calculate the sampling interval when frequency is specified using
732 * set to the correct sampling rate.
773 /* Reserve CPU-measurement sampling facility */ in __hw_perf_event_init()
788 /* Access per-CPU sampling information (query sampling info) */ in __hw_perf_event_init()
792 * sampling info from the current CPU, otherwise use event->cpu to in __hw_perf_event_init()
794 * Later, cpuhw indicates whether to allocate sampling buffers for a in __hw_perf_event_init()
803 * sampling structure for accessing the CPU-specific QSI. in __hw_perf_event_init()
809 /* Check sampling facility authorization and, if not authorized, in __hw_perf_event_init()
819 pr_warn("CPU Measurement Facility sampling is temporarily not available\n"); in __hw_perf_event_init()
824 /* Always enable basic sampling */ in __hw_perf_event_init()
827 /* Check if diagnostic sampling is requested. Deny if the required in __hw_perf_event_init()
828 * sampling authorization is missing. in __hw_perf_event_init()
838 /* Check and set other sampling flags */ in __hw_perf_event_init()
854 /* Allocate the per-CPU sampling buffer using the CPU information in __hw_perf_event_init()
856 * CPU (event->cpu == -1; or cpuhw == NULL), allocate sampling in __hw_perf_event_init()
863 /* Event is not pinned, allocate sampling buffer on in __hw_perf_event_init()
874 /* If PID/TID sampling is active, replace the default overflow in __hw_perf_event_init()
875 * handler to extract and resolve the PIDs from the basic-sampling in __hw_perf_event_init()
897 /* No support for taken branch sampling */ in cpumsf_pmu_event_init()
909 /* Support sampling of CPU cycles in addition to the in cpumsf_pmu_event_init()
912 * sampling events only. in cpumsf_pmu_event_init()
954 /* Check whether to extent the sampling buffer. in cpumsf_pmu_enable()
956 * Two conditions trigger an increase of the sampling buffer for a in cpumsf_pmu_enable()
959 * 2. Sampling overflows that contribute to pending allocations. in cpumsf_pmu_enable()
961 * Note that the extend_sampling_buffer() function disables the sampling in cpumsf_pmu_enable()
962 * facility, but it can be fully re-enabled using sampling controls that in cpumsf_pmu_enable()
979 /* (Re)enable the PMU and sampling facility */ in cpumsf_pmu_enable()
986 pr_err("Loading sampling controls failed: op %i err %i\n", in cpumsf_pmu_enable()
1014 /* Switch off sampling activation control */ in cpumsf_pmu_disable()
1021 pr_err("Loading sampling controls failed: op %i err %i\n", in cpumsf_pmu_disable()
1029 /* TEAR/DEAR values are valid only if the sampling facility is in cpumsf_pmu_disable()
1031 * for a disabled sampling facility because cpumsf_pmu_enable() in cpumsf_pmu_disable()
1158 * Walks through a sample-data-block and collects sampling data entries that are
1159 * then pushed to the perf event subsystem. Depending on the sampling function,
1160 * there can be either basic-sampling or combined-sampling data entries. A
1161 * combined-sampling data entry consists of a basic- and a diagnostic-sampling
1162 * data entry. The sampling function is determined by the flags in the perf
1163 * event hardware structure. The function always works with a combined-sampling
1166 * Note that the implementation focuses on basic-sampling data entries and, if
1167 * such an entry is not valid, the entire combined-sampling data entry is
1208 " sampling data entry: te->f %i" in hw_collect_samples()
1214 * from a combined basic- and diagnostic-sampling. in hw_collect_samples()
1215 * If only basic-sampling is then active, entries are in hw_collect_samples()
1241 /* hw_perf_event_update() - Process sampling buffer
1245 * Processes the sampling buffer and create perf event samples.
1246 * The sampling buffer position are retrieved and saved in the TEAR_REG
1265 * AUX buffer is used when in diagnostic sampling mode. in hw_perf_event_update()
1290 * is reached, extend the sampling buffer. in hw_perf_event_update()
1382 * Finish sampling on the cpu. Called by cpumsf_pmu_del() with pmu
1418 * Start sampling on the CPU. Called by cpumsf_pmu_add() when an event
1604 * Measurement alert handler for diagnostic mode sampling.
1631 "diagnostic-sampling mode is full\n", in hw_collect_aux()
1712 * aux_buffer_setup() - Setup AUX buffer for diagnostic mode sampling
1738 "maximum sampling buffer limit\n", in aux_buffer_setup()
1743 "minimum sampling buffer limit\n", in aux_buffer_setup()
1828 /* Check if the new sampling period/freqeuncy is appropriate.
1844 * sampling structure for accessing the CPU-specific QSI. in cpumsf_pmu_check_period()
1866 /* Activate sampling control.
1867 * Next call of pmu_enable() starts sampling.
1887 /* Deactivate sampling control.
1888 * Next call of pmu_enable() stops sampling.
1926 /* Set up sampling controls. Always program the sampling register in cpumsf_pmu_add()
1928 * that is used by hw_perf_event_update() to store the sampling buffer in cpumsf_pmu_add()
1940 /* Ensure sampling functions are in the disabled state. If disabled, in cpumsf_pmu_add()
1941 * switch on sampling enable control. */ in cpumsf_pmu_add()
1994 * The availablitiy depends on the CPU_MF sampling facility authorization
1996 * time by the sampling facility device driver.
1998 * also turned off for diagnostic sampling.
2001 * level for diagnostic sampling and installs the attribute
2002 * file for diagnostic sampling if necessary.
2095 /* Sampling authorization change request */ in cpumf_measurement_alert()
2106 /* Invalid sampling buffer entry */ in cpumf_measurement_alert()
2108 pr_err("A sampling buffer entry is incorrect (alert=0x%x)\n", in cpumf_measurement_alert()
2170 pr_info("The sampling buffer limits have changed to: " in param_set_sfb_size()
2188 pr_err("Sampling facility support for perf is not available: " in pr_cpumsf_err()
2216 /* Sampling of diagnostic data authorized, in init_cpum_sampling_pmu()