From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753822AbbIHJcn (ORCPT ); Tue, 8 Sep 2015 05:32:43 -0400 Received: from mga14.intel.com ([192.55.52.115]:55212 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751658AbbIHJck (ORCPT ); Tue, 8 Sep 2015 05:32:40 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,489,1437462000"; d="scan'208";a="764553298" From: Alexander Shishkin To: Takao Indoh , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra , Arnaldo Carvalho de Melo , Vivek Goyal , Steven Rostedt Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v2 2/4] perf: Add function to enable perf events in kernel with ring buffer In-Reply-To: <1441691364-5612-3-git-send-email-indou.takao@jp.fujitsu.com> References: <1441691364-5612-1-git-send-email-indou.takao@jp.fujitsu.com> <1441691364-5612-3-git-send-email-indou.takao@jp.fujitsu.com> User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Tue, 08 Sep 2015 12:32:36 +0300 Message-ID: <87r3m9fe8b.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Takao Indoh writes: > perf_event_create_kernel_counter is used to enable perf events in kernel > without buffer for logging its events. This patch add new fucntion which > enable perf events with ring buffer. Intel PT logger uses this to enable > Intel PT and some associated events with its log buffer. Have you seen [1] and related patches? I haven't gotten around to updating them yet, but hopefully it's going to happen soon. The problem is that for such api to work, this memory needs to be accounted, especially when you start handling event inheritance. For system crash dump it doesn't really matter, but I also need a similar api for per-task core dumps, for example. [1] https://lkml.org/lkml/2014/10/13/290 Thanks, -- Alex