From: Jean Guyader Subject: Re: Scheduler stats and some doubts Date: Sun, 13 Sep 2009 02:27:19 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Marco Tizzoni Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hi, 2009/9/12 Marco Tizzoni : > Hello, > someone can tell me how to enable scheduler statistics and how to display= them? > > I found this comment: > > --------------------------------------- > /* > =A0* CSCHED_STATS > =A0* > =A0* Manage very basic per-vCPU counters and stats. > =A0* > =A0* Useful for debugging live systems. The stats are displayed > =A0* with runq dumps ('r' on the Xen console). > =A0*/ > #ifdef PERF_COUNTERS > #define CSCHED_STATS > #endif > --------------------------------------- > > I've just enabled this in Rules.mk: > --------------------------------------- > verbose =A0 =A0 =A0 ?=3D y > perfc =A0 =A0 =A0 =A0 ?=3D y > perfc_arrays =A0?=3D y > --------------------------------------- > > now xenperf works but I don't know how to access the "Xen console". > The perf counters are a debug key. You can access the xen console via seria= l by doing CTRL+A-CTRL+A, then h. You might need to enable debug for perf counters. You can also invoke a debug key using xm directly. Jean > Also, not related to this issue, I'm interested in accounting how many > ticks the net backend driver spends in rx/tx. > Can it make sense using the getrusage() function at start/end of > net_rx_action()/net_tx_action() or it can lead to unconsistent > accounting? > > Is there a better way? > > Any suggestions are welcome. > > Thanks in advance. > Marco >