Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754133AbbG2WUX (ORCPT ); Wed, 29 Jul 2015 18:20:23 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:36790 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751228AbbG2WUU (ORCPT ); Wed, 29 Jul 2015 18:20:20 -0400 Subject: Re: llvm bpf debug info. Re: [RFC PATCH v4 3/3] bpf: Introduce function for outputing data to perf event To: pi3orama References: <1436522587-136825-1-git-send-email-hekuang@huawei.com> <1436522587-136825-4-git-send-email-hekuang@huawei.com> <55A042DC.6030809@plumgrid.com> <55A3404B.6020904@huawei.com> <20150713135223.GB9917@danjae.kornet> <4D441676-21A7-46EE-AAB0-EB529D408082@163.com> <20150713140915.GD9917@danjae.kornet> <55A46928.9090708@plumgrid.com> <55A4F869.1020705@huawei.com> <55A88085.8090407@plumgrid.com> <55A88137.7020609@huawei.com> <55A88449.3030008@plumgrid.com> <55B0D5FC.6050406@huawei.com> <55B1535E.8090406@plumgrid.com> <55B1AEE9.1080207@plumgrid.com> <55B1BC03.9020708@huawei.com> <55B35F42.70803@huawei.com> <55B6E685.30905@plumgrid.com> <55B89F04.5030304@huawei.com> <55B909B2.2080606@plumgrid.com> <9FFA6584-4803-4C59-BDD8-FDF471FBD9F9@163.com> Cc: He Kuang , "Wangnan (F)" , "linux-kernel@vger.kernel.org" From: Alexei Starovoitov Message-ID: <55B951A0.5040607@plumgrid.com> Date: Wed, 29 Jul 2015 15:20:16 -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: <9FFA6584-4803-4C59-BDD8-FDF471FBD9F9@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: 1179 Lines: 21 On 7/29/15 1:00 PM, pi3orama wrote: > I was wondering if you could give us a hint on adding BPF specific builtins? > > Doesn't like other machines, currently there's no Builtins.def for BPF to hold > builtins for that specific target. If we start creating such builtins, we can bring > more there. One builtins I want to see should be __builtin_bpf_strcmp(char*, char*), > with that we can filter events base on name of a task. What I really need is filtering > events based on comm of the main thread, which should be useful on Android > since in Android name of working threads are always something like "Binder_?", > only the main threads names are meaningful. But let's work on strcmp first. Currently there are 4 of them in IntrinsicsBPF.td but I don't see how strcmp can work with current no-loops restriction. As an alternative to filter binder threads you can use memcmp(ptr, "Binder_", 6) since it will get unrolled fully. -- 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/