Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1663601ioo; Sun, 22 May 2022 23:32:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGJh7qYNeT+0gcnS3U5dB/rJDANmk5ViaFExV64JHomFogt8Qf1UKJdMVSF2BnmjaWoWqU X-Received: by 2002:a63:5fcf:0:b0:3f6:298d:e2ea with SMTP id t198-20020a635fcf000000b003f6298de2eamr19543186pgb.561.1653287525482; Sun, 22 May 2022 23:32:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653287525; cv=none; d=google.com; s=arc-20160816; b=hKltIbZLzu4OvqWUQJsN9gLMl9VmuI5xfjfpKUfqJE3hqRd9KHErqd64xW9/i3yKO6 NAMd7TRx4WEGrnp0RC/CEHq14cQFeBTwow3iCTU3rap/yD2O27V7ISLVdKeX5CbUno5W X6vXpvl5Qw14ksi5vtQ/6zBrOa3bVkqHx8BvIimrSZ2FkMFKQOn/ushvoak0Jr7cE55y hP9k8xZtiMVKkf2L2gqHAAVLB/zpZhsbOdOIj7+tV+eBJWFBEI8dTG+3N1vNPl8lfo+h caeTn8DGlbvCwDIkulDqe1HAY6a7xpHgICrYQ4gZdDdp44jwgOM8K/YQlhNU8IIg7YB7 yDrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=/H6FksuJpMo8QoRJSVxkZdGNLFn7WEdBNMVPknI1zCc=; b=RCBj3bv1PCDWWgngsenXU/BXvRc+kb3XRkprrHA1qihMZwlZNgJ4oMYDfj0YPffyqe mlpmplWz23iiox25MxwnjbWWJUK7Nf2Cb63B9h0SeZA0Jm8wyds/MBeuVNFxK6kTlLUL ZZxtF2mG8rWywlO3XqIakhO2StGyNUIwuuOM8T9OeShcw3NUMKgebinAq+ioMJtWOix0 5lzbz1oPp4MdZkLZHKPrcUbfR//q4o6cvw1/A7v3zH4it3K/oyA1E9E1sKDRvNMkPCK8 cTiNMLcwxIzJpsRnUR/7D9U9wAfS15s+DK1jzhaQ1Vfk68f71+91boYIeNAHH1A/DlZV wvHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JUt8T6fb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 17-20020a630c51000000b003c21cf1aa49si9287628pgm.483.2022.05.22.23.32.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 23:32:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JUt8T6fb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 89DDA4616E; Sun, 22 May 2022 23:08:29 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233253AbiEWBNI (ORCPT + 99 others); Sun, 22 May 2022 21:13:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233042AbiEWBNF (ORCPT ); Sun, 22 May 2022 21:13:05 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08742377F9 for ; Sun, 22 May 2022 18:13:04 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id r23so19186267wrr.2 for ; Sun, 22 May 2022 18:13:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/H6FksuJpMo8QoRJSVxkZdGNLFn7WEdBNMVPknI1zCc=; b=JUt8T6fbl6Th7kEeKaLn2/2ArJK5fVw0y9pO5ErspjNKXfJihcYko5H+uxiBaxBOEj oWz5fZY2L+4+1EIDvUerBD26qp4SDlP+LP7PXib6LUclpa5BQ0ZUKppKAN9qlfupfmjw +JTamby7bQYKRJKOtENFP+Su+AEFsjd03oRuBaGkYmSf4eyZZ1+ZxQgglSh2+H57x3AZ gEiqdTaXwq2b6RAsWCG5woNaNJto8kcasufK+Oq3lFCDmC6LkAlBr97WS5PuXLXdjOtw WSx8F17m2/2/DUx5UPuJXhh640klT1zkVKZSUQvNIqAsGEQq9G5ty6IZjMB2Yhw0uRpA pWvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/H6FksuJpMo8QoRJSVxkZdGNLFn7WEdBNMVPknI1zCc=; b=uyczi9xsL9Y8M7j6bJa59atidYIFnz4WCcrh+ALXzjYz6Y2lyQVELYDtX65ZxNOEgm p1FtLhQh6HGpYZVQdM3fObMUeboLZYam+1Kq32BHYh3UfOiO0kk24EJx/FDw+bDA7rbu 6yknMEscK3odutlbGAKQI4B5vXMHqVXc9qdR6BobgzvgFHjg/6AeH8Dh13ZGpn8tQvZm Qe70sFwWamas2ULghQg8t6jd28Gv/UeXUw5Bwf7iEut8E2Cso70i1/qGxxJc1Ea3loAW 5yg4mnV2AKQSwNlVrDVAj2KWpBmBBlXH9gM4FD8asBpCBxIOtMS/TlNDzzllgssG4zP1 x+gg== X-Gm-Message-State: AOAM530aaVANTsEyzT2Nh7IYuf7V+sG5MkmK2VJToFdm8YizxuILcuKm 28MEMcwhnloHA2r5kTHGukiWQMFMEIytl5ZAtN0= X-Received: by 2002:a5d:480c:0:b0:20e:6133:132 with SMTP id l12-20020a5d480c000000b0020e61330132mr17287906wrq.593.1653268382219; Sun, 22 May 2022 18:13:02 -0700 (PDT) MIME-Version: 1.0 References: <20220512170008.1301613-1-xiehuan09@gmail.com> <20220512170008.1301613-3-xiehuan09@gmail.com> <20220522232216.bb1451fb6efc18c2bccc8d09@kernel.org> In-Reply-To: <20220522232216.bb1451fb6efc18c2bccc8d09@kernel.org> From: Jeff Xie Date: Mon, 23 May 2022 09:12:50 +0800 Message-ID: Subject: Re: [PATCH v10 2/4] trace/objtrace: Get the value of the object To: Masami Hiramatsu Cc: Steven Rostedt , mingo@redhat.com, Tom Zanussi , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Masami, On Sun, May 22, 2022 at 10:22 PM Masami Hiramatsu wrote: > > Hi Jeff, > > On Fri, 13 May 2022 01:00:06 +0800 > Jeff Xie wrote: > > [...] > > @@ -175,9 +271,27 @@ trace_object_trigger(struct event_trigger_data *data, > > > > field = obj_data->field; > > memcpy(&obj, rec + field->offset, sizeof(obj)); > > - set_trace_object(obj, tr); > > + /* set the offset from the special object and the type size of the value*/ > > + set_trace_object(obj, obj_data->obj_offset, > > + obj_data->obj_value_type_size, tr); > > } > > > > +static const struct objtrace_fetch_type objtrace_fetch_types[] = { > > + {"u8", 1}, > > + {"s8", 1}, > > + {"x8", 1}, > > + {"u16", 2}, > > + {"s16", 2}, > > + {"x16", 2}, > > + {"u32", 4}, > > + {"s32", 4}, > > + {"x32", 4}, > > + {"u64", 8}, > > + {"s64", 8}, > > + {"x64", 8}, > > Hmm, as far as I can see, you don't distinguish the prefix 'u','s','x'. > If so, please support only 'x' at this moment. kprobe events supports > those types, and it distinguishes the types when printing the logged > data. E.g. 's16' shows '-1' for 0xffff, but 'x16' shows '0xffff'. > You can add another patch to support such different types afterwards. Thanks, I will add another patch to support it . > > + {} > > If this array is null terminated, please explictly do that, like > > {NULL, 0}, > > for readability. Thank you for your reminder. > Thank you, > > -- > Masami Hiramatsu (Google) Thanks, JeffXie