Commit Graph
111 Commits
Author SHA1 Message Date
Roger Pau Monne 9163062a39 tools/build: Introduce {PREPEND,APPEND}_{LIB,INCLUDES}
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>
2011-11-14 18:14:07 +00:00
Ian Campbell 61d0fe74c6 tools: Remove $(CFLAGS) from links lines.
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>
2011-03-31 19:32:18 +01:00
Ian Campbell 2f885fa9cc tools/xenstat: 23075:b4351d57464b added libxenstat.so but didn't build fPIC
This broke on x86_64.

Reported-by: Olaf Hering
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>
2011-03-24 13:35:58 +00:00
Ian Campbell 88b247616f tools: xenstat: install and use shared library
Remove .so files from the .a file.

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>
2011-03-23 15:18:46 +00:00
Ian Campbell 8e9a52f1fd tools: consistently use $({CFLAGS,LDLIBS}_libxenstore) instead of open coding.
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>
2011-03-21 18:06:27 +00:00
Ian Campbell ca366c33f3 tools: consistently use $({CFLAGS,LDLIBS}_libxenctrl) instead of open coding.
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>
2011-03-21 18:05:49 +00:00
Ian Campbell 3531dea6fd tools: consistently use $(CFLAGS_xeninclude) instead of open coding.
Renamed from the slightly ambiguous CFLAGS_include.

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>
2011-03-21 18:04:59 +00:00
Keir Fraser 547cb1849c build: Make XEN_ROOT an absolute path.
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>
2011-03-17 10:36:25 +00:00
Stefano Stabellini ba26a1e197 split LDLIBS from LDFLAGS to fix link errors in recent toolchains
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>
2010-08-11 18:02:32 +01:00
Keir Fraser 5cc436c1d2 libxc: eliminate static variables, use xentoollog; API change
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>
2010-05-28 09:30:19 +01:00
Keir Fraser 070cf3db9e xentop: fix NULL pointer dereference
On my system, I'm getting SIGSEGVs in xentop because
xenstat_node_domain() is returning NULL.  Skip the loop if it does
rather than crashing.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-20 14:10:07 +01:00
Keir Fraser eccb4696e8 Fix Makefile targets that generate several files at once
In a few places in the tree the Makefiles have constructs like this:
   one_file another_file:
       $(COMMAND_WHICH_GENERATES_BOTH_AT_ONCE)
This is wrong, because make will run _two copies_ of the same command
at once.  This generally causes races and hard-to-reproduce build
failures.

Notably, `make -j4' at the top level will build stubdom libxc twice
simultaneously!

In this patch we replace the occurrences of this construct with the
correct idiom:
   one_file: another_file
   another_file:
       $(COMMAND_WHICH_GENERATES_BOTH_AT_ONCE)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-03-05 14:40:19 +00:00
Keir Fraser 41a3140ea2 xentop: tmem: no stats for non-tmem domains
In xentop, don't re-use and print stale data of previous tmem
domain for subsequent non-tmem domain.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
2010-03-03 17:40:48 +00:00
Keir Fraser 5f05fba8c1 tmem, xentop: Report a few key per-domain tmem statistics in xentop.
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
2009-12-09 10:46:11 +00:00
Keir Fraser 422f39c72e xentop: Allow full domain name display
Add a '-f' option to xentop to allow the full domain name to be
displayed. This is the original behavior which can cause the display
to be unaligned. Customers have requested this because only the
trailing characters of their domain names are unique and therefore
cannot be distinguished when the display is limited to a 10 character
width.

Signed-off-by: Charles Arnold <carnold@novell.com>
2009-12-02 18:43:28 +00:00
Keir Fraser 80d4e9ca77 xenstat: Fixes for 20528:e6e3bf767d16 (stats for dom0 network bonding)
In above c/s I introduced dom0 statistics for case we use network
bonding. The indentation was not good for xenstat C codebase and also
some modifications were done to the logic, mainly not using the parsed
variables we don't care about (as we care only about
{tx|rx}{bytes,packets,errs,drops} and no other variable from
/proc/net/dev) by passing NULLs to variables we don't care about. Also
dom0 statistics alteration was fixed to include {tx|rx}{drop,errs} for
dom0 (previous version of my patch was not having this code applied).

Signed-off-by: Michal Novotny <minovotn@redhat.com>
2009-12-02 13:45:35 +00:00
Keir Fraser fc50aaf0d8 xentop: Add tmem-freeable info when tmem is active
(No change to xentop output when tmem is inactive.)

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
2009-12-01 13:38:18 +00:00
Keir Fraser 1fd93d4f8c xenstat: Linux dom0 statistics for case we use network bonding
I've created a patch that alters dom0 statistics (if empty like in
case of network bonding) and puts network bridge statistics
instead. It's been tested with network bonding both enabled and
disabled and also by creating a standalone network bridge without
bonding... It was working fine in all my tests...

Signed-off-by: Michal Novotny <minovotn@redhat.com>
2009-12-01 13:37:20 +00:00
Keir Fraser 14ec087884 xentop: Add two more VBD statistics
In addition to VBD read/write request#, add VBD read/write sector#
also. It makes VBD throughput observation easier. As the method to get
such info is OS dependent, just Linux version code is added.

Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
2009-11-05 12:00:58 +00:00
Keir Fraser aa4af83c50 xenstat: Use backend path which is compatible with pvops and 2.6.18-xen kernels.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2009-07-07 14:01:30 +01:00
Keir Fraser 9f8501582f Use -MMD -MF in tools/* rather than -Wp,-M...
If you use -MMD -MF then the correct .o filename is written to the
.*.d file as the compiler driver arranges everything.  This was done
in 19010:275abe1c5d24 for the hypervisor.

In this patch we do the same elsewhere in the xen-unstable tree,
particularly tools/.  Specifically:
 * Change tools/Rules.mk to add -MMD -MF ... to CFLAGS and set DEPS.
 * Remove -Wp,-MD... from every other Makefile
 * Remove setting of DEPS from every other Makefile
 * Ensure that every Makefile says -include $(DEPS)
 * Ensure that every Makefile's clean target removes $(DEPS)

Some Makefiles were already halfway there, but often for a different
variable name eg PROG_DEP.  The variable name is now standardised in
Rules.mk as DEPS.

I have done a test build with this change, on Debian etch.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2009-01-12 10:16:05 +00:00
Keir Fraser 050404c847 xentop: Fix fprintf() build failure.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-11 22:32:20 +00:00
Keir Fraser 66664705d9 xentop: Fix xentop for blktap
Blktap devices information isn't shown by xentop currently.

xen-unstable c/s 17813 said "blktap devices have statistics
counters (e.g., rd_req, wr_req, oo_req) prepended by tap_".
In fact, it is as follows.

# ls -l /sys/devices/xen-backend/tap-1-769/statistics/
total 0
-r--r--r-- 1 root root 4096 Dec  3 20:37 oo_req
-r--r--r-- 1 root root 4096 Dec  3 20:37 rd_req
-r--r--r-- 1 root root 4096 Dec  3 20:37 rd_sect
-r--r--r-- 1 root root 4096 Dec  3 20:37 wr_req
-r--r--r-- 1 root root 4096 Dec  3 20:37 wr_sect

The statistics counters haven't had "tap_" because it was removed
by linux-2.6.18-xen c/s 34.

This patch reverts xen-unstable c/s 17813, then we can get the
blktap devices information by using xentop.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-12-03 15:58:23 +00:00
Keir Fraser 13ad235ee7 xentop: Fix display of long domain names.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-22 14:04:27 +01:00
Keir Fraser 3adee298e7 Fix a few typos
From: Diego Ongaro <diego.ongaro@eu.citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-04 11:25:20 +01:00
Keir Fraser 499da5e253 tools: use $(PREFIX) rather than hard-coding /usr
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-07-24 14:33:28 +01:00
Keir Fraser 55bfc14465 xentop: declare signal handler as static
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-07-14 13:26:45 +01:00
Keir Fraser d8be3b59d1 xenstat: some cleanups
sprintf -> snprintf
 malloc(n * m) -> calloc(n, m)
 get rid of a cast

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-10 14:15:53 +01:00
Keir Fraser 572d6c9581 libxenstat: Fix statistics for blktap disks on linux
Overview: update xenstat vbd statistics parsing from
/sys/devices/xen-backend to process blktap disks

Reason:
        -blktap devices (now referenced as tap rather than vbd in
        /sys) have statistics counters
        (e.g.,  rd_req, wr_req, oo_req) prepended by tap_
        -xenstat behavior did not previously account for this
        behavior, which resulted in 0 disks
        visible and similarly impacted disk statistics

To reproduce these conditions, make a domain with tap:aio backed disks
on 3.2.x, run xentop, and press B to view VBD stats (nothing will
appear for the domain using tap:aio)

Signed-off-by: steve.maresca@gmail.com
2008-06-10 09:27:01 +01:00
Keir Fraser d91702d514 Fix domain names that xentop shows
When I changed the name of a domain by using xm rename command, the
name of the domain that xentop shows did not change.  This patch
reflects new domain name to the name of domains that xentop shows.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-26 08:37:43 +01:00
Keir Fraser 166a028ffe tools/xenstat build: Use generic subdirs rules.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-03-25 09:49:03 +00:00
Keir Fraser 2376142a75 Add periodic fflush to xentop batch mode.
From: Yusuke KANEKI <Kaneki.Yusuke@ea.MitsubishiElectric.co.jp>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-03-18 11:04:20 +00:00
Keir Fraser b5b593108f tools: Compile xentop only if curses are available.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-03-04 13:29:36 +00:00
Keir Fraser 0d85523cf3 Fix libxenstat on Solaris
Recent Solaris enhancements have changed the way virtual NIC
statistics are collected - fix libxenstat up for this.

Signed-off-by: John Levon <john.levon@sun.com>
2008-02-27 13:10:42 +00:00
Keir Fraser be5fbf9a7f Move generation of public header hierarchy into the tools.
This patch merges the two versions of public header generation
currently used in the build into one.

Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-26 10:38:44 +00:00
Keir Fraser 2b2eda45a3 Add MANDIR, MAN1DIR and MAN8DIR. Use it.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-22 14:35:17 +00:00
Keir Fraser 93e3de7b94 Add SBINDIR. Use it always.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-22 14:35:02 +00:00
Keir Fraser 2eaec0bc67 xentop: build fix for *bsd.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-10-23 14:42:50 +01:00
Keir Fraser 07f557cb63 Replace sysctl.physinfo.sockets_per_node with more directly useful
sysctl.physinfo.nr_cpus. This also avoids miscalculation of
sockets_per_node by Xen where the number of CPUs in the system is
clipped.
From: Elizabeth Kon <eak@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-19 18:00:10 +01:00
Keir Fraser 9d6b92ef1a xentop: Flush batch output on SIGTERM or SIGINT.
Signed-off-by: INAKOSHI Hiroya <inakoshi.hiroya@jp.fujitsu.com>
2007-10-02 13:19:25 +01:00
Keir Fraser 98418f1c1e Missed files in previous changeset.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-24 15:41:20 +01:00
Keir Fraser d1729249ef xenstat/xenstore: NetBSD fixes.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-24 15:38:52 +01:00
kfraser@localhost.localdomain d1b295913f xentop: fix abnormal value cpu(%) when domain shutdown.
If we test multiple domain create/shutdown many times.
sometimes abnormal values of cpu(%) are appeared.
This is because shutdown domain remove failure.
(in other words, memory corruption of struct )
This corruption makes abnormal cpu(%) values are shown xentop
sometimes.

Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
2007-08-07 09:06:38 +01:00
kfraser@localhost.localdomain be259653f3 Extended the physinfo sysctl to export NUMA cpu_to_node topology info.
Print this in 'xm info'.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-06 16:12:07 +01:00
kfraser@localhost.localdomain f63ebd213e xentop: Fix -b option (batch mode).
Some curses libraries don't work with xentop in batch mode, avoid
those calls. Avoid the over-verbose summary lines when batch mode is
requested.

Signed-off-by: Gary Pennington <gary.pennington@sun.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-13 11:13:11 +01:00
kfraser@localhost.localdomain c241f9d02d xentop: Display blktap information.
Signed-off-by: Satoshi UCHIDA <s-uchida@ap.jp.nec.com>
2007-06-07 11:14:18 +01:00
kfraser@localhost.localdomain 757d07a4db xenstat: Adding to scan blktap information.
Signed-off-by: Satoshi UCHIDA <s-uchida@ap.jp.nec.com>
2007-06-07 11:13:41 +01:00
kfraser@localhost.localdomain db4208af98 Fix stale email addresses in xenstat and xentop.
Our @us.ibm.com emails cannot forward to us; we do not have access to
them when not interning at IBM.  People have attempted to reach us via
those addresses and failed; occasionally they've Googled for a current
address, which made us realize the problem.  Change each email to a
more permanent address, so people can reach us in the future.  Change
bug reporting addresses to a xen mailing list rather than an
individual.

Signed-off-by: Josh Triplett <josh@kernel.org>
2007-05-31 10:42:34 +01:00
Keir Fraser 19bfd597b4 xenstat: Remove the "vbd-%d-%d is a VBD." debugging statement.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-05-07 13:52:50 +01:00
kfraser@localhost.localdomain eeafc64a2a xentop: Fix memory leak.
Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
2007-04-02 13:08:05 +01:00