Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1307595imm; Thu, 6 Sep 2018 20:30:58 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ+8fi0fZVOfEUZ2QK2BEH4j61kzhEtvFh++gDP50iL1MlOBVGOtsfzRMOoPB/IsdID729e X-Received: by 2002:a17:902:b115:: with SMTP id q21-v6mr5910607plr.333.1536291058880; Thu, 06 Sep 2018 20:30:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536291058; cv=none; d=google.com; s=arc-20160816; b=KxDVHLj7IsUH7KSFLbyd4D+msNdu0SDzezEoFcb/pl2p1CCmhNRfNJ0C6tht6iAPGi n9xI9S/elfMVyH+ooiKEFMWfYchRXdn0SZ5AwQwWGxDaxTJ8vhJGOqp4rZh/YuTg/F4+ pwENc4/Rr2AAEyioSfsqQ+7Ke0qg/1HqZpYYiZt6N0YBmpFP0m1kiId11DMqOL1s9ZIv w5hyqBrtZQOwluIWq/TxAd0MW3gTwRr2InmCIwnRP4/AGEvJrO1HDNTmuTWyVMQNqU3D OH77wz465YHsJmttN5t5MKAIVrPvtP8B7qSWDSQrzuiHGE4iQVFQapMVIGRi85rqQj4g 2pNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=0bS7hxHtnK/PGqgWqy9Fvf7O5yBlyU/9tgnFwx4ZblU=; b=tD5ieORtH7zojHyhxunow6lmGX2jWmEK6Llyq3UO58mDBS6RBuReOKbI7H9L8+wM+J lU38yBCBd4G777YtKoe7PiJXdg24lc3O5AvgdRNsxQGqlzVi1X9oEeaKyshwnHXFPbG2 tm94wrUmJxTJxg3ZIIlbNp0YbtZBmW+4faZKsSUpDEljDjbvL9TfRQYu5fcU9Zxba5x6 OYrbNwBY2owtuLRE6eXkmnEHI+RtQX6hWeR7Vyn7AA4Mtjy8AlxA96qn6KGpn1XybeRb x38Le2cDc+0ZB7Z0QVoJI8hJdufMPXgOOIbfRwKI2Y0Lc4WTRrhMOzCJRHoR+L99d/EW CbBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m76-v6si6993082pfg.323.2018.09.06.20.30.43; Thu, 06 Sep 2018 20:30:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727266AbeIGIG5 (ORCPT + 99 others); Fri, 7 Sep 2018 04:06:57 -0400 Received: from mga17.intel.com ([192.55.52.151]:32874 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727069AbeIGIG4 (ORCPT ); Fri, 7 Sep 2018 04:06:56 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Sep 2018 20:28:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,340,1531810800"; d="scan'208";a="89689902" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.126]) by orsmga002.jf.intel.com with ESMTP; 06 Sep 2018 20:28:11 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id 7B4D3300B65; Thu, 6 Sep 2018 20:28:11 -0700 (PDT) Date: Thu, 6 Sep 2018 20:28:11 -0700 From: Andi Kleen To: Wei Wang Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, pbonzini@redhat.com, kan.liang@intel.com, peterz@infradead.org, mingo@redhat.com, rkrcmar@redhat.com, like.xu@intel.com Subject: Re: [PATCH v2 1/8] perf/x86: add a function to get the lbr stack Message-ID: <20180907032811.GO27886@tassilo.jf.intel.com> References: <1536233456-12173-1-git-send-email-wei.w.wang@intel.com> <1536233456-12173-2-git-send-email-wei.w.wang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1536233456-12173-2-git-send-email-wei.w.wang@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +int perf_get_lbr_stack(struct perf_lbr_stack *stack) > +{ > + stack->lbr_nr = x86_pmu.lbr_nr; > + stack->lbr_tos = x86_pmu.lbr_tos; > + stack->lbr_from = x86_pmu.lbr_from; > + stack->lbr_to = x86_pmu.lbr_to; > + > + if (x86_pmu.intel_cap.lbr_format == LBR_FORMAT_INFO) > + stack->lbr_info = MSR_LBR_INFO_0; > + else > + stack->lbr_info = 0; Seems weird to export the enum value if the enum isn't exported. How can it be used? -Andi