From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: IPC sampling Date: Fri, 03 Jun 2016 07:43:06 -0700 Message-ID: <87oa7imiyt.fsf@tassilo.jf.intel.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from mga01.intel.com ([192.55.52.88]:7157 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752663AbcFCOnI (ORCPT ); Fri, 3 Jun 2016 10:43:08 -0400 In-Reply-To: (Jose's message of "Fri, 3 Jun 2016 11:54:57 +0000 (UTC)") Sender: linux-perf-users-owner@vger.kernel.org List-ID: To: Jose Cc: linux-perf-users@vger.kernel.org Jose writes: > > My problem now is that I don't know how to obtain "cycles" and > "instructions" from perf.data file. I have tried several options using "perf > report" and "perf script" but I don't achieve it. perf record -e '{instructions,cycles}:S' ... perf script This means sample on cycles, but always read instructions too during the sample. Then match up the values with the same time stamp from perf script and calculate ipc, or use a perf script interpreted script to do so. -Andi -- ak@linux.intel.com -- Speaking for myself only