[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Reading hardware performance events in xen dom0


  • To: xen-users@xxxxxxxxxxxxx
  • From: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxx>
  • Date: Mon, 06 May 2013 13:23:35 +0200
  • Cc: Tsafack Chetsa Ghislain Landry <ghislain.landry.tsafack.chetsa@xxxxxxxxxxx>, Wei Liu <wei.liu2@xxxxxxxxxx>
  • Delivery-date: Mon, 06 May 2013 11:24:24 +0000
  • Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:X-IronPort-AV: Received:Received:From:To:Cc:Subject:Date:Message-ID: User-Agent:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:Content-Type; b=roDIsSpMQiODaKjwEFp7U5AosZWoBcYqX+yAP1qLEY1rv4E9xElUNIjr fmG5iQ0+vyJjXeOU0XIDTs5zoGQFO80xL+c1wVMTeXVECep1Egf8X6Rrq b8dLDfKKHqmqsfI5RI82T15TfjocEiQEZuV9jr9gVQDWaov13tUc837FP M7UvIg89HZ5C+kXlPsHkUvmCPvUahIz1wrw+/PnZN9kXOF/mU0QpCUHWV QDZLdp+W/eErA8YcQ4XYGSavzVSKy;
  • List-id: Xen user discussion <xen-users.lists.xen.org>

Am Montag 06 Mai 2013, 12:07:44 schrieb Wei Liu:
> On Mon, May 06, 2013 at 11:52:54AM +0100, Tsafack Chetsa Ghislain Landry 
> wrote:
> > Greetings,
> > 
> > Sorry for disturbing, I have just installed Xen on my system (kernel 
> > version 2.6.32-5-xen-amd64) and I would like to read hardware events in 
> > dom0, I have a program which usually do that in non-Xen kernels (see 
> > beneath).
> > 
> > void open_perf(struct perf_event_attr* attr) {
> >   static int current=0;
> >   int cpu;
> >   for(cpu=0; cpu<NBCORE; cpu++) {
> >     perfctr[current+cpu]=sys_perf_event_open(attr, -1, cpu, -1, 0);
> > 
> >     if(perfctr[current+cpu] <0) {
> >       printf("open : %d (%d et %d)\n", perfctr[current+cpu], attr->config, 
> > current+cpu);
> >       exit(1);
> >     }
> >   }
> >   current+=NBCORE;
> > }
> > 
> > The problem is that the system call "sys_perf_event_open" systematically 
> > returns -1
> > 
> > I was wondering whether anyone has experienced the same issue and how I get 
> > rid of that.
> > 
> > I tried using perf, but I guess the same thing happens:
> > here is an example:
> > 
> > Performance counter stats for 'mpirun -np 2 ./ep.A':
> > 
> >    55075.066063  task-clock-msecs         #      1.986 CPUs
> >             282  context-switches         #      0.000 M/sec
> >               4  CPU-migrations           #      0.000 M/sec
> >            2330  page-faults              #      0.000 M/sec
> >   <not counted>  cycles
> >   <not counted>  instructions
> >   <not counted>  cache-references
> >   <not counted>  cache-misses
> > 
> >    27.735049988  seconds time elapsed
> > 
> 
> AFAICT this is not yet supported. Boris@oracle seems to be working on
> getting perf to profile Dom0 and Xen.

Only HVM domains are supported (when specifying the vpmu flag).

Dietmar.

-- 
Company details: http://ts.fujitsu.com/imprint.html

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.