Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754232AbbHMVtj (ORCPT ); Thu, 13 Aug 2015 17:49:39 -0400 Received: from mail-yk0-f177.google.com ([209.85.160.177]:36481 "EHLO mail-yk0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751773AbbHMVth (ORCPT ); Thu, 13 Aug 2015 17:49:37 -0400 Subject: Re: [RFC PATCH v6 0/2] Make eBPF programs output data to perf To: pi3orama References: <1437448130-134621-1-git-send-email-hekuang@huawei.com> <55CD0BCF.2030400@plumgrid.com> <3DE5423D-3E4E-4395-846D-7D5EAD1BB911@163.com> Cc: He Kuang , "rostedt@goodmis.org" , "masami.hiramatsu.pt@hitachi.com" , "acme@kernel.org" , "a.p.zijlstra@chello.nl" , "mingo@redhat.com" , "namhyung@kernel.org" , "jolsa@kernel.org" , "wangnan0@huawei.com" , "linux-kernel@vger.kernel.org" From: Alexei Starovoitov Message-ID: <55CD10EE.7000300@plumgrid.com> Date: Thu, 13 Aug 2015 14:49:34 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <3DE5423D-3E4E-4395-846D-7D5EAD1BB911@163.com> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1045 Lines: 19 On 8/13/15 2:35 PM, pi3orama wrote: > I was thinking about whether to add a "type" field there, so we will have an explicit > mov const instruction before the call instruction, which can act as a mark. Also, if > we generate the type code automatically, a type field in this API can make things > easier since we don't need wrap the user structure in BPF stack. However, the > LLVM side is not ready yet, so we haven't post the new version. I think the helper was clean enough. Any type info probably needs to be done as a side channel and not part of the helper anyway. But, ok, let's figure out the type stuff first. Also I don't think you can rely on extra insn in front of a call insn. Compiler can freely insert other insns there. You don't want to introduce data flow analysis in elf parser. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/