aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xentrace
Commit message (Collapse)AuthorAgeFilesLines
* libxc: introduce xc_domain_get_guest_width()Dario Faggioli2013-09-131-6/+3
| | | | | | | | | | | | | | As a wrapper to XEN_DOMCTL_get_address_size, and use it wherever the call was being issued directly via do_domctl(), saving quite some line of code. Actually, the function returns the guest width in bytes, rather than directly what XEN_DOMCTL_get_address_size provides (which is a number of bits), since that is what it is useful almost everywhere. Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xenctx: Support arm64 and actually implement output for 32 and 64 bitIan Campbell2013-04-241-4/+137
| | | | | | | A bit basic and fuggly but a start. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xenctx: remove trailing whitespaceIan Campbell2013-04-241-9/+9
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xenctx: remove remnants of ia64 supportIan Campbell2013-04-241-301/+1
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* trace: Add reason for NMI exit TRAPKonrad Rzeszutek Wilk2013-03-251-0/+1
| | | | | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
* trace: Add the other variant of do_blockKonrad Rzeszutek Wilk2013-03-251-0/+1
| | | | | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
* trace: Add trace events for IRQ activitiesKonrad Rzeszutek Wilk2013-03-251-0/+9
| | | | | | | | | | | | | | This expands the format to include the class of TRC_HW_IRQ. This means that instead of: CPU28 1753521436727 (+ 3252) unknown (0x0000000000802008) [ 0x0000006c 0x4605709c 0x4605b682 0x00000000 0x00000000 0x00000000 0x00000000 ] we now see: CPU28 1753521436727 (+ 3252) do_irq [ irq = 108, began = 1174761628us, ended = 1174779522us ] Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* trace: Use correct trace class for power management changesKonrad Rzeszutek Wilk2013-03-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | Previous to this patch we would see in the trace file: CPU28 1753503175371 (+ 8496) unknown (0x0000000000801002) [ 0x00000004 0x4158a498 0x000003a1 0x000027e6 0x00000000 0x00000000 0x00000000 ] CPU28 1753505321239 (+ 2145868) unknown (0x0000000000801003) [ 0x00000004 0x4166dca7 0x000000fa 0x00000000 0x00000000 0x00000000 0x00000000 ] CPU28 1753505343756 (+ 22517) unknown (0x0000000000801002) [ 0x00000004 0x41670fe5 0x00001284 0x00003766 0x00000000 0x00000000 0x00000000 ] CPU28 1753521413711 (+16069955) unknown (0x0000000000801003) [ 0x00000004 0x41d1e02c 0x000000ab 0x00000000 0x00000000 0x00000000 0x00000000 ] instead of: CPU28 1753503175371 (+ 8496) cpu_idle_entry [ C0 -> C4, acpi_pm_tick = 1096328344, expected = 929us, predicted = 10214us ] CPU28 1753505321239 (+ 2145868) cpu_idle_exit [ C4 -> C0, acpi_pm_tick = 1097260199, irq = 250 0 0 0 ] CPU28 1753505343756 (+ 22517) cpu_idle_entry [ C0 -> C4, acpi_pm_tick = 1097273317, expected = 4740us, predicted = 14182us ] CPU28 1753521413711 (+16069955) cpu_idle_exit [ C4 -> C0, acpi_pm_tick = 1104273452, irq = 171 0 0 0 ] The patch that added the cpu_idle_[entry|exit] was using the TRC_HW_IRQ class (0x00802000) instead of TRC_HW_PM (0x00801000) as a base. Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* Fix emacs local variable block to use correct C style variable.David Vrabel2013-02-212-2/+2
| | | | | | | 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
* trace: trace hypercalls inside a multicallDavid Vrabel2012-10-032-1/+3
| | | | | | | | | | Add a trace record for every hypercall inside a multicall. These use a new event ID (with a different sub-class ) so they may be filtered out if only the calls into hypervisor are of interest. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: George Dunlap <george.dunlap@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* trace: improve usefulness of hypercall trace recordDavid Vrabel2012-10-032-0/+7
| | | | | | | | | | | | | | | | | | Trace hypercalls using a more useful trace record format. The EIP field is removed (it was always somewhere in the hypercall page) and include selected hypercall arguments (e.g., the number of calls in a multicall, and the number of PTE updates in an mmu_update etc.). 12 bits in the first extra word are used to indicate which arguments are present in the record and what size they are (32 or 64-bit). This is an incompatible record format so a new event ID is used so tools can distinguish between the two formats. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: George Dunlap <george.dunlap@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* trace: allow for different sub-classes of TRC_PV_* tracepointsDavid Vrabel2012-10-031-22/+22
| | | | | | | | | | | | | | | | | | We want to add additional sub-classes for TRC_PV tracepoints and to be able to only capture these new sub-classes. This cannot currently be done as the existing tracepoints all use a sub-class of 0xf. So, redefine the PV events to use a new sub-class. All the current tracepoints are tracing entry points to the hypervisor so the sub-class is named TRC_PV_ENTRY. This change does not affect xenalyze as that only looks at the main class and the event number and does not use the sub-class field. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: George Dunlap <george.dunlap@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* arm: compile xentraceStefano Stabellini2012-05-301-0/+12
| | | | | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools/build: Introduce {PREPEND,APPEND}_{LIB,INCLUDES}Roger Pau Monne2011-11-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | Create two new variables called APPEND_ and PREPEND_ to add compile flags at the beginning or at the end of the search path. Added a new semantic for user defined compile flags, here is the list of possible options: PREPEND_LIB: add libraries to the search path before xen (before xen installation folders). PREPEND_INCLUDES: add headers to the search path before xen (before xen installation folders). APPEND_LIB: add libraries to the search path at the end (after all xen installation folders have been added). APPEND_INCLUDES: add libraries to the search path at the end (after all xen installation folders have been added). EXTRA_INCLUDES and EXTRA_LIB can still be used, and they will have the same effect as PREPEND_INCLUDES and PREPEND_LIB. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xenctx: add option -C to dump context for all vcpusOlaf Hering2011-06-171-2/+24
| | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenctx: move xc_* access out of dump_ctxOlaf Hering2011-06-171-41/+62
| | | | | | | | | move xc_* access out of dump_ctx. Update code paths to return an error instead of calling exit(). On error unpause the guest if it was paused by xenctx. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenctx: move all globals into struct xenctxOlaf Hering2011-06-171-37/+39
| | | | | | | | Move all globals used for options and libxc data into a new struct xenctx. This is used in subsequent changes. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenctx: recognize also -S option for --stack-traceOlaf Hering2011-06-171-2/+2
| | | | | | | Update help text. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* Tracing facility for nested virtualizationKeir Fraser2011-04-141-0/+3
| | | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir@xen.org>
* tools/xentrace: decode 'continue_running' and 'RDTSC' entries.Christoph Egger2011-04-131-0/+2
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* tools: remove pattern matched linking rulesIan Campbell2011-03-311-18/+7
| | | | | | | | | Most subdirs only build a single tool to start with and those which build multiple tools often have different linkage requirements. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Remove $(CFLAGS) from links lines.Ian Campbell2011-03-311-6/+6
| | | | | | | | The relevant variable in these circumstances is called $(LDFLAGS). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* build: Make XEN_ROOT an absolute path.Keir Fraser2011-03-171-1/+1
| | | | | | | | Otherwise make can search the path relative to certain standard paths such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in Config.mk suffers from this). Signed-off-by: Keir Fraser <keir@xen.org>
* xentrace: build fix "array subscript has type 'char'"Keir Fraser2011-01-111-3/+3
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* xenctx: misc adjustmentsKeir Fraser2011-01-111-13/+28
| | | | | | | | | - fix off-by-one errors during symbol insertion and lookup - don't store the symbol type, as it wasn't needed at all so far and is only needed now at parsing time - don't insert certain kinds of symbols Signed-off-by: Jan Beulich <jbeulich@novell.com>
* libxc: convert evtchn interfaces to use an opaque handle typeIan Campbell2010-12-231-8/+7
| | | | | | | | | | | | This makes the interface consistent with the changes made to the main interface in 21483:779c0ef9682c. Also fix some references to "struct xc_interface" which should have been simply "xc_interface" in tools/xenpaging, and update QEMU_TAG to pull in the corresponding qemu change. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* split LDLIBS from LDFLAGS to fix link errors in recent toolchainsStefano Stabellini2010-08-111-3/+3
| | | | | | | | | | | | | | | | Linker command lines are order-sensitive. Move linker options -Lfoo -lfoo from LDFLAGS to LDLIBS and place this new variable after the objects to link. This resolves build errors in xenpagin and blktap with recent toolchains. rename SHLIB_CFLAGS to SHLIB_LDFLAGS rename LDFLAGS_* to LDLIBS_* move LDFLAGS usage after CFLAGS in CC calls remove stale comments in xenpaging Makefile Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/xentrace: increase default xentrace buffer size.Ian Jackson2010-07-081-1/+1
| | | | | | | increase default xentrace buffer size to reduce the number of lost records. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* trace: share t_info pages only in read-only modeKeir Fraser2010-06-291-5/+5
| | | | | | | | There's no need to share writably the t_info pages (Dom0 only wants [and needs] to read it) Signed-off-by: Jan Beulich <jbeulich@novell.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
* xentrace: update formats file for INTR_WINDOW and NPFKeir Fraser2010-06-071-0/+2
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* libxc: eliminate static variables, use xentoollog; API changeKeir Fraser2010-05-283-11/+11
| | | | | | | | | | | | | | | | | | | | This patch eliminate the global variables in libxenctrl (used for logging and error reporting). Instead the information which was in the global variables is now in a new xc_interface* opaque structure, which xc_interface open returns instead of the raw file descriptor; furthermore, logging is done via xentoollog. There are three new parameters to xc_interface_open to control the logging, but existing callers can just pass "0" for all three to get the old behaviour. All libxc callers have been adjusted accordingly. Also update QEMU_TAG for corresponding qemu change. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xenctx: Add --kernel-start option, to set the user/kernel splitKeir Fraser2010-05-271-7/+14
| | | | | | Used when displaying stack traces. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* xentrace: install scripts with python install wrapperKeir Fraser2010-05-151-1/+2
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* xentrace: Add missing help optionKeir Fraser2010-04-131-0/+3
| | | | | | Describe the --reserve-disk-space option in the xentrace help. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* xentrace: Add an option not to enable tracingKeir Fraser2010-04-131-2/+16
| | | | | | | | | Add an option that will set up the buffers and listen for updates, but will not enable tracing. This is useful if you have hacks in Xen to enable tracing at key points (for example, debugging a shadow bug). Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* xentrace: Skip to low cpu when throwing away portions of the circular bufferKeir Fraser2010-04-131-0/+15
| | | | | | | Skip to the next "low" cpu when throwing away portions of the circular memory buffer. This makes subsequent analysis easier. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* xentrace: Disable tracing, then read records one more time.Keir Fraser2010-02-031-4/+14
| | | | | | | | | | | When interrupted, first disable tracing, then read through the records one last time. Without this patch, it's possible to get traces which interact (such as runstate changes) on processors with higher numbers, while missing the corresponding traces generated on lower-numbered processors. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* xentrace: XC_PAGE_SIZE should be usedKeir Fraser2010-01-211-1/+1
| | | | | | | | | 20827:fad80160c001 cannot be compiled on ia64: xentrace.c:647: error: 'PAGE_SIZE' undeclared (first use in this This patch fixes it. Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
* xentrace: Per-cpu xentrace buffersKeir Fraser2010-01-201-73/+60
| | | | | | | | | | | | | | | | In the current xentrace configuration, xentrace buffers are all allocated in a single contiguous chunk, and then divided among logical cpus, one buffer per cpu. The size of an allocatable chunk is fairly limited, in my experience about 128 pages (512KiB). As the number of logical cores increase, this means a much smaller maximum per-cpu trace buffer per cpu; on my dual-socket quad-core nehalem box with hyperthreading (16 logical cpus), that comes to 8 pages per logical cpu. This patch addresses this issue by allocating per-cpu buffers separately. Signed-off-by: George Dunlap <dunlapg@umich.edu>
* xentrace: fix "%016x" formatKeir Fraser2009-08-111-35/+44
| | | | | | | | | xentrace_format cannot use "0x016x" format as we expect. It show only %(N) as "0x016x" format, not as "%(N+1)08x%(N)08x". So I fixed tools/xentrace/formats by using "%(N+1)08x%(N)08x" format. Also I added some TRC_PV entries. Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
* x86 Cx tracing: export the Cx exit reason (pending interrupt during Cx)Keir Fraser2009-06-291-1/+1
| | | | Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
* x86 Cx tracing: export expected/predicted Cx to xentraceKeir Fraser2009-06-291-1/+1
| | | | Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
* xentrace: Trace IRQs and entry/exit timestamps.Keir Fraser2009-05-192-0/+18
| | | | | From: Dulloor <dulloor@gmail.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xentrace: Clean up HVM I/O tracing.Keir Fraser2009-04-241-2/+4
| | | | | Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xenctx, ia64: fix compilation error.Keir Fraser2009-04-021-1/+1
| | | | Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* xenctx: Teach xenctx how to find the right addresses in real-mode.Keir Fraser2009-03-311-8/+30
| | | | Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* xenctx: Always show code context, even when not in kernel modeKeir Fraser2009-03-311-14/+20
| | | | Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* xentrace: Add acpi pm tick output to idle tracingKeir Fraser2009-03-191-2/+2
| | | | | | | The reason is that tsc stops and it causes the inaccuracy. And later we can write some scripts based on this patch. Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
* xentrace: error handling on non-existent formats fileKeir Fraser2009-03-121-1/+5
| | | | | | | Attached patch does proper error handling when specified formats file doesn't exist. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* xenctx: print x86_32 context on x86_64Keir Fraser2009-02-061-0/+31
| | | | | | Although x86_64 context covers x86_32, I think it's easy to watch. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>