What:		/sys/devices/system/cpu/cpuXX/perfmon
Date:		Nov 2007
KernelVersion:	2.6.24
Contact:	eranian@hpl.hp.com

Description:	exports internal perfmon2 statistics to user. Mostly used for debugging
		and performance analysis of the perfmon2 subsystem. Statistics can be
		reset using the /sys/kernel/perfmon/reset_stats entry.
	
		There is one subdir per online CPU. Each subdir contains the following
		entries:

	/sys/devices/system/cpu/cpuXX/perfmon/ctxsw_count (read-only):
	
		Number of PMU context switches (switch-out, switch-in or both).

	/sys/devices/system/cpu/cpuXX/perfmon/ctxsw_ns (read-only):

		Number of nanoseconds spent in the PMU context switch routine.
		Dividing this number by the value of ctxsw_count, yields average
		cost of the PMU context switch.

	/sys/devices/system/cpu/cpuXX/perfmon/fmt_handler_calls (read-only):

		Number of calls to the sampling format routine that handles
		PMU interrupts, i.e., typically the routine that records a sample.

	/sys/devices/system/cpu/cpuXX/perfmon/fmt_handler_ns (read-only):

		Number of nanoseconds spent in the routine that handle PMU
		interrupt in the sampling format. Dividing this number by
		the number of calls provided by fmt_handler_calls, yields
		average time spent in this routine.

	/sys/devices/system/cpu/cpuXX/perfmon/ovfl_intr_all_count (read-only):

		Number of PMU interrupts received by the kernel.


	/sys/devices/system/cpu/cpuXX/perfmon/ovfl_intr_nmi_count (read-only):

		Number of Non Maskeable Interrupts (NMI) received by the kernel
		for perfmon. This is relevant only on X86 hardware.
	
	/sys/devices/system/cpu/cpuXX/perfmon/ovfl_intr_ns (read-only):

		Number of nanoseconds spent in the perfmon2 PMU interrupt
		handler routine. Dividing this number of ovfl_intr_all_count
		yields the average time to handle one PMU interrupt.

	/sys/devices/system/cpu/cpuXX/perfmon/ovfl_intr_regular_count (read-only):

		Number of PMU interrupts which are actually processed by 
		the perfmon interrupt handler. There may be spurious or replay
		interrupts.

	/sys/devices/system/cpu/cpuXX/perfmon/ovfl_intr_replay_count (read-only):

		Number of PMU interrupts which were replayed on context switch in or
		on event set switching. Interrupts get replayed when they were in
		flight at the time monitoring had to be stopped.

	/sys/devices/system/cpu/cpuXX/perfmon/ovfl_intr_spurious_count (read-only):

		Number of PMU interrupts which were dropped because there was no
		active context (session).

	/sys/devices/system/cpu/cpuXX/perfmon/ovfl_notify_count (read-only):

		Number of user level notification sent. Notification are appended
		as messages to the context queue. Notifications may be sent on
		PMU interrupts.

	/sys/devices/system/cpu/cpuXX/perfmon/pfm_restart_count (read-only):

		Number of times pfm_restart() is called.

	/sys/devices/system/cpu/cpuXX/perfmon/reset_pmds_count (read-only):

		Number of times pfm_reset_pmds() is called.

	/sys/devices/system/cpu/cpuXX/perfmon/set_switch_count (read-only):

		Number of event set switches.

	/sys/devices/system/cpu/cpuXX/perfmon/set_switch_ns (read-only):

		Number of nanoseconds spent in the set switching routine.
		Dividing this number by set_switch_count yields the average
		cost of switching sets.

	/sys/devices/system/cpu/cpuXX/perfmon/handle_timeout_count (read-only):

		Number of times the pfm_handle_timeout() routine is called. It is
		used for timeout-based set switching.

	/sys/devices/system/cpu/cpuXX/perfmon/handle_work_count (read-only):

		Number of times pfm_handle_work() is called. The routine handles
		asynchronous perfmon2 work for per-thread contexts (sessions).
