aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/perfc.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix emacs local variable block to use correct C style variable.David Vrabel2013-02-211-1/+1
| | | | | | | The emacs variable to set the C style from a local variable block is c-file-style, not c-set-style. Signed-off-by: David Vrabel <david.vrabel@citrix.com
* eliminate first_cpu() etcJan Beulich2011-11-081-2/+2
| | | | | | | | This includes the conversion from for_each_cpu_mask() to for_each-cpu(). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
* eliminate cpus_xyz()Jan Beulich2011-11-081-2/+2
| | | | | | Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
* Remove many uses of cpu_possible_map and iterators over NR_CPUS.Keir Fraser2010-05-141-10/+16
| | | | | | | The significant remaining culprits for x86 are credit2, hpet, and percpu-area subsystems. To be dealt with in a separate patch. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Rename for_each_cpu() to for_each_possible_cpu()Keir Fraser2009-07-151-4/+4
| | | | | | ... to be more precise in naming, and also to match Linux. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Enhance guest memory accessor macros so that source operands can bekfraser@localhost.localdomain2007-06-201-1/+1
| | | | | | | | | | | pointers to const or arrays. Only build-tested on ia64, and untested for powerpc (which, however, is almost identical to ia64, except for an apparent bug in the original version of __copy_field_{from,to}_guest in that the field offset was multiplied by the field size). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* [XEN] Truncate arithmetic for PERFSTATUS counters to the width of perfc_t.Tim Deegan2007-04-241-0/+8
| | | | | | | | Since these are all calculated per-cpu now, a status counter that is incremented on one cpu and decremented on another will underflow on the decrement. When we add the per-cpu values to get the total, if we don't truncate the sum it will be max-perfc + 1 instead of zero. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* xen: Make all performance counter per-cpu, avoiding the need to updatekfraser@localhost.localdomain2007-03-271-79/+90
| | | | | | | | | | | | | | | | | | | | | | | | | them with atomic (locked) ops. Conversion here isn't complete in the sense that many places still use the old per-CPU accessors (which are now redundant). Since the patch is already rather big, I'd prefer replacing those in a subsequent patch. While doing this, I also converted x86's multicall macros to no longer require inclusion of asm-offsets.h in the respective C file (on IA64 the use of asm-offsets.h in C sources seems more wide spread, hence there I rather used IA64_ prefixes for the otherwise conflicting performance counter indices). On x86, a few counter increments get moved a little, to avoid duplicate counting of preempted hypercalls. Also, a few counters are being added. IA64 changes only compile-tested, hence somebody doing active IA64 work may want to have a close look at those changes. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Xen and tools now require gcc 3.4+ on x86.Keir Fraser2007-03-171-13/+4
| | | | | | | | | | | | | | | - gcc-3.2 cannot handle some multi-line assertions in the Xen sources. Noone noticed. - gcc-3.3 has problems with alignment constraints inside typedefs. gcc 3.4.0 is now three years old so I hope that everyone has an up-to-date compiler, or can obtain a more up-to-date package for their distribution. If not we may need to fall back to supporting gcc-3.3.x as well. Also clean up the way we do version checks, using the power of awk. Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Fix perfc after 13756:56377f5ce588Ian Campbell2007-01-311-4/+13
| | | | | | | 64 bit guest handles can no longer be passed as parameters to functions. Extract such parameters into a regular guest handle first. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* Remove uses of strcpy and strncpy from common and x86 code.kfraser@localhost.localdomain2007-01-291-2/+1
| | | | | | | | Retain safe_strcpy(). It can hide the third argument to strlcpy() in most cases. Based on patches from Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* Replace sprintf with snprintf and strncpy with strlcpy.kfraser@localhost.localdomain2007-01-291-2/+1
| | | | | | | | There are various cases where no NULL-terminated strings are guaranteed and eventual possible overflows. This patch fixes them. From: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* Fix perfc=y build.kfraser@localhost.localdomain2007-01-251-2/+2
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] perf counters: Fix NULL-pointer check. Should happen later.kaf24@localhost.localdomain2006-10-271-6/+7
| | | | Signed-of-by: Kouya Shimura <kouya@jp.fujitsu.com>
* Fix build w/ perfc after cset 11394:96a4379be74aSteven Hand2006-09-011-2/+2
| | | | Signed-off-by: Steven Hand <steven@xensource.com>
* Fix hypervisor build with performance counters after -unstableSteven Hand2006-08-281-7/+8
| | | | | | cset 11257:86d26e6ec89b Signed-off-by: Steve Dobbelstein <steved@us.ibm.com>
* Replace dom0_ops hypercall with three new hypercalls:kfraser@localhost.localdomain2006-08-251-5/+3
| | | | | | | | | | | | | | | | | | | | | | 1. platform_op -- used by dom0 kernel to perform actions on the hardware platform (e.g., MTRR access, microcode update, platform quirks, ...) 2. domctl -- used by management tools to control a specified domain 3. sysctl -- used by management tools for system-wide actions Benefits include more sensible factoring of actions to hypercalls. Also allows tool compatibility to be tracked separately from the dom0 kernel. The assumption is that it will be easier to replace libxenctrl, libxenguest and Xen as a matched set if the dom0 kernel does not need to be replaced too (e.g., because that would require vendor revalidation). From here on we hope to maintain dom0 kernel compatibility. This promise is not extended to tool compatibility beyond the existing guarantee that compatibility will not be broken within a three-level stable release [3.0.2, 3.0.3, etc.]. Signed-off-by: Keir Fraser <keir@xensource.com>
* Provides hooks for perfc print/reset/gather.kaf24@firebug.cl.cam.ac.uk2006-08-071-6/+6
| | | | | | | These arch-neutral hooks allow architectures to report hardware counters. Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
* Change DOM0_PERFCCONTROL: remove array limit.kaf24@firebug.cl.cam.ac.uk2006-08-071-14/+23
| | | | | | | Descriptors and values are passed by two distinct buffers. Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
* Use DEFINE_SPINLOCK consistently throughout Xen.kaf24@firebug.cl.cam.ac.uk2006-06-011-1/+1
| | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* This patch conditionalizes some output from perfc_printall(), thus making ↵kaf24@firebug.cl.cam.ac.uk2006-05-021-10/+16
| | | | | | | | | | | | | relevant information more compact and easier legible. It additionally changes the formatting so that trailing spaces are avoided. Also changing the type of some variables from plain int to unsigned int, as that is yielding more efficient code on x86-64 (signed 32-bit array indices require explicit sign extension, whereas in most cases an extra copy can be avoided when the index type is unsigned, since all 32-bit operations already zero-extend their results). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Fix perfc array range on reset.kaf24@firebug.cl.cam.ac.uk2006-05-021-1/+1
| | | | | Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Rename *GUEST_HANDLE to *XEN_GUEST_HANDLE.kaf24@firebug.cl.cam.ac.uk2006-04-271-1/+1
| | | | | Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
* Upgrade all hypercalls to use the new guest_handle interface (on the Xen side).kaf24@firebug.cl.cam.ac.uk2006-03-071-1/+0
| | | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Rename guest_handle() macro to GUEST_HANDLE() and define_guest_handle()kaf24@firebug.cl.cam.ac.uk2006-03-031-1/+1
| | | | | | | | | to DEFINE_GUEST_HANDLE(). All caps for datatype declarations and definitions got the popular vote. :-) Signed-off-by: Keir Fraser <keir@xensource.com>
* Move dom0_op hypercall to the guest_handle interface (inside Xen).kaf24@firebug.cl.cam.ac.uk2006-03-031-4/+5
| | | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Add some profiling support for writeable pagetables.iap10@freefall.cl.cam.ac.uk2005-08-131-0/+9
| | | | | | Signed-off-by: ian@xensource.com
* bitkeeper revision 1.1548 (4294554btfa2GpomqV57KFpxEHsjEA)kaf24@firebug.cl.cam.ac.uk2005-05-251-6/+7
| | | | | | | | | Move to Linux's cpumask_t and 'hotplug' multi-processor booting interfaces. This also brings apic.c and various other files closer to their Linux 2.6 equivalents. Simplified the scheduler interfaces a little (particularly per-cpu and idle-domain initialisation). Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1389.5.49 (4280abe5EW2fJtuPr5_E283AlKrziQ)mafetter@fleming.research2005-05-101-0/+8
| | | | | | Added back the printing of perfc arrays & histograms, under compile-time control in xen/Rules.mk
* bitkeeper revision 1.1389.13.1 (428097bfFCQnxc6PG1CYe-6KhZD8kA)mafetter@fleming.research2005-05-101-0/+1
| | | | | Minor shadow code improvements.
* bitkeeper revision 1.1236.1.84 (423ab8a8Ull_l3xygvrErQi9C35RrQ)kaf24@firebug.cl.cam.ac.uk2005-03-181-6/+0
| | | | | | Don't print unwieldy array/histogram perfcounters by default. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1236.1.58 (42288505tf22vxeNSISpP2B48DpV5A)kaf24@scramble.cl.cam.ac.uk2005-03-041-0/+1
| | | | | | Fix the Emacs 'local variables' block to include required end stmt. Signed-off-by: Keir Fraser <keir.fraser@cl.cam.ac.uk>
* bitkeeper revision 1.1236.1.41 (4224ab34YunoDc0_FV3T0OZPcJ0Pcw)kaf24@scramble.cl.cam.ac.uk2005-03-011-0/+4
| | | | | | | | Performance counters for hypercalls and exceptions. Perfctr histograms for pagetable updates. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@intel.com> Signed-off-by: Keir Fraser <keir.fraser@cl.cam.ac.uk>
* bitkeeper revision 1.1236.1.17 (421e4879kSyHWNvied24BDzGi-OmgA)kaf24@scramble.cl.cam.ac.uk2005-02-241-1/+1
| | | | | | Struct rename. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1236.1.14 (421db08d6LIbanwxXMIaE6u0X5DIbQ)kaf24@scramble.cl.cam.ac.uk2005-02-241-1/+9
| | | | | | Move Emacs mode lines to end of files, out of the way. Signed-off-by: Keir Fraser <keir.fraser@cl.cam.ac.uk>
* bitkeeper revision 1.1159.212.95 (4204aa0ee0re5Xx1zWrJ9ejxzgRs3w)kaf24@scramble.cl.cam.ac.uk2005-02-051-4/+5
| | | | | | | Various cleanups. Remove PDB pending simpler GDB stub and/or NetBSD debugger. Force emacs mode to appropriate tabbing in various files. Signed-off-by: keir.fraser@cl.cam.ac.uk
* bitkeeper revision 1.1159.187.48 (41adc6420WlNaaoUkvfgNxl44rpYYg)kaf24@scramble.cl.cam.ac.uk2004-12-011-2/+109
| | | | | Export Xen s/w perfctrs to DOM0 via new 'xenperf' utility.
* bitkeeper revision 1.1159.1.320 (4186495166A8XLekEbNixl7hWUA08w)kaf24@freefall.cl.cam.ac.uk2004-11-011-3/+3
| | | | | | Clean up softirq handling. All debug keypresses are now deferred to a softirq handler.
* bitkeeper revision 1.825.2.1 (4062d28avHqOBupTrfJcONXWeibf9A)iap10@tetris.cl.cam.ac.uk2004-03-251-2/+41
|\ | | | | | | | | grand unification of shadow table stuff
| * bitkeeper revision 1.794.1.4 (40623aebq_XP4MvV6YJsXGleofDYNg)iap10@tetris.cl.cam.ac.uk2004-03-251-1/+1
| | | | | | | | | | | | | | shadow mode improvements : use hash table to avoid increasing pfn_info size. improved locking in preparation for SMP guests.
| * bitkeeper revision 1.794.1.3 (405de995_4scoWE5EfQzN5TSoyS8Gw)iap10@tetris.cl.cam.ac.uk2004-03-211-2/+41
| | | | | | | | | | fixes plus new performance counters
* | bitkeeper revision 1.821 (406007d6uu0vZYDxa9P1ZfNO9kF_Cg)kaf24@scramble.cl.cam.ac.uk2004-03-231-6/+6
|/ | | | | | | | | | | | Many files: xeno -> xen renames. ide-xen.c: Rename: xen/drivers/ide/ide-xeno.c -> xen/drivers/ide/ide-xen.c xen.lds: Rename: xen/arch/i386/xeno.lds -> xen/arch/i386/xen.lds Many files: mvdir
* bitkeeper revision 1.394 (3f3f5bd5J74WkH-WgWI6a5W5aobvaQ)kaf24@scramble.cl.cam.ac.uk2003-08-171-11/+11
| | | | | | Many files: Forced TLB flushes when a domain page changes type is now done more lazily. Fixed a few bugs at the same time, and cleaned up perfctr output.
* bitkeeper revision 1.389 (3f28df19Z3T_sAYRfO2FBURRnxpp_w)kaf24@scramble.cl.cam.ac.uk2003-07-311-9/+11
| | | | | | dev.c, perfc_defn.h, perfc.c, domain_page.c: Perfctr hacks and additions.
* bitkeeper revision 1.383 (3f280e11xqcx0wyODFX9WY58mF0mtA)kaf24@scramble.cl.cam.ac.uk2003-07-301-1/+1
| | | | | | perfc.c: Fix perfctr handling.
* bitkeeper revision 1.379 (3f27c63d0n0AK0DFCerOSUf9Wi3atA)kaf24@scramble.cl.cam.ac.uk2003-07-301-7/+10
| | | | | | dev.c, perfc_defn.h, perfc.h, perfc.c: Added perfctrs to net rx path.
* bitkeeper revision 1.378 (3f27c2beWNYX6OSWHkL7l2xJ5Qm9ng)kaf24@scramble.cl.cam.ac.uk2003-07-301-94/+43
| | | | | | perfc_defn.h, perfc.h, lib.h, vsprintf.c, perfc.c: Cleaned up Xen performance counter mechanism.
* bitkeeper revision 1.122.4.1 (3e70f9de9vqrPg9WRlAsGz1oZFMW9g)iap10@labyrinth.cl.cam.ac.uk2003-03-131-3/+5
| | | | | Don't profile time spent printing our perf counters!
* bitkeeper revision 1.122.3.1 (3e70a321BvGVezZroK7FFHJEDihQag)rn@wyvis.research.intel-research.net2003-03-131-47/+80
| | | | | more perfcounters
* bitkeeper revision 1.122.1.1 (3e6dd2571tuS-UOLoEX2Z4iIxMPlxA)kaf24@scramble.cl.cam.ac.uk2003-03-111-0/+2
| | | | | | pci.h, perfc.c: Fixed PCI DMA code -- a fake virtual address of NULL is actually valid.