Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1405757pxk; Fri, 25 Sep 2020 14:01:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJd6MznithIvp74TQOj6vWIThz2oc/KjNQlGVcHUZYmI/h8MsEECq/ehkJKH26E6KgvC+0 X-Received: by 2002:a05:6402:b1a:: with SMTP id bm26mr3389986edb.209.1601067669633; Fri, 25 Sep 2020 14:01:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601067669; cv=none; d=google.com; s=arc-20160816; b=0y6hTf8Owe8+X5oXe7K6UXf22SPQg+1mGqlivxkQtN7RQgXPH4ujbWvCWkcczAM33F OIa6YKZdl940mHXQn1bsv/TYu9n9NvpblSWlItzD5AtpyZzPTRxNS3T7IAbMKeCWALQC 0tPOIXb9GTSlztbNKtiZ21utFD5WLDrq9LY5ZIXUlpbbYnvstNvFBKlh2gr8Gnh1ChwN /LgOHWOcLyiBmJiuiN+Cx5bBHfPj1z0lXGPKcGv1R3d3ee25t3olqG5NtSeOSOU3ksH7 Lb1STTKgDW8htUouzU5+AIr6+VGvPgOSFTJBNgI6s1NKWSnitESWiWmAbAaLLRKIW8bK Z2+Q== 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=CgeT1UxhckyXDPY2lGvngm3rc9GEe2KOAzxyq6miOO4=; b=djqsC21xBZPdeMYHMadJS1HIalHO4/3OnWJnAqq5f1du+CBiHlU0a3/nLxioEUBdij 9jGSOfr8fr+A07vx0dyQ3Tgp9LhtgCFNWZaHppBAlWxIg9Qg27zvUqjxcIslvkE4pANp aEAYqJ12d1bLljJYcHskkUlu/14e3F/cqejm46d0GsmY//tye87jCkvXAFjgGP6nQsUG gO54fMUIaBaoduxeeSVtF/Y5kTS5mplFoY1QGTZ4JjOQQx5mug/2ME/4Leg1V9EvkzUG f2xl5m5LTJUDQvLkbFC9MAboJtYDvpDhaQxGeCLgAHlINHUULKf5UrbxJhYp+hElNNKt J32g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="Au9OPHd/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r25si2558832ejz.567.2020.09.25.14.00.46; Fri, 25 Sep 2020 14:01:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="Au9OPHd/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726980AbgIYU5s (ORCPT + 99 others); Fri, 25 Sep 2020 16:57:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726037AbgIYU5s (ORCPT ); Fri, 25 Sep 2020 16:57:48 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98018C0613CE for ; Fri, 25 Sep 2020 13:57:48 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id o25so3622347pgm.0 for ; Fri, 25 Sep 2020 13:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CgeT1UxhckyXDPY2lGvngm3rc9GEe2KOAzxyq6miOO4=; b=Au9OPHd/+pjONlExdGz/vM8D9ilyoGa2CUF7Jx7d6vg2rYzwlZQRGCVHf1LrhRLO8d FavKrJ8Uuo1jS6PJiuTCJz7JBoRle3blc3LHwA9CKFjq/W6mESOamnyw5LWBSiEq5e1o 3ROQBfdwNCHkqyA3xx7gYEpMvzGukWoXktcnwVdwHH5jvW/bJCTOkdnpS6bTrqYAdIt2 +TXRk+tZFpbaJ2NIhsEFtcrnite8Uo7tGsH2ZiLDFtnhWnIQYJmcmcAwBJuumRQXiQky RsnOoQ2Dac2QtP7+4nZU5xQ/hxkTtAorcEuIfwmykpf7VRXfpR6TYKHGVNxIIAmUUWYU 2UsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CgeT1UxhckyXDPY2lGvngm3rc9GEe2KOAzxyq6miOO4=; b=k+RMqzgYY0w8tuvwGo5wKzOg9WBcScODqRUe/p5O/Z7IEXooh3YM+8+fsEyizSFIC0 F/GYR15pg5p1wEixAWqL8+OO9To3EK7GxHwi+yxgjH+5vS+v228YCKzS9R5t9Wu+2zD3 JJMFge1tEK2i6VEBVScaHydnRmk1aqq7qFsYGY+CuLMOCTP/eyrxuuwhCRBC7YOpe3bW 0OZ/4My0t0KiOY/eeEYfhKPxxLoelHN/DZNQvvgfYSlR916NcwlA8+gaEtfLHEmOE0jm P/wDsMJknLi/PGoUnlljhUY1vT+nZi+Ya/nqZAVp/M1SCYZoyrtr7vJtWfVXujenE/Xh L9Yg== X-Gm-Message-State: AOAM5305gObXYEi9PTNV+zhnE/gPj88dDj1ULTdD22BPDw7p7w6oU+HP Mv5+gzbVBsGHU8zyoX6Wn0SI+imuBbP5EEoM1Eq6NvMWUqs= X-Received: by 2002:aa7:9556:0:b029:13e:d13d:a0fe with SMTP id w22-20020aa795560000b029013ed13da0femr401287pfq.26.1601067467880; Fri, 25 Sep 2020 13:57:47 -0700 (PDT) MIME-Version: 1.0 References: <20200925190806.1870935-1-axelrasmussen@google.com> In-Reply-To: From: Axel Rasmussen Date: Fri, 25 Sep 2020 13:57:11 -0700 Message-ID: Subject: Re: [RFC PATCH 0/1] tracing: support dynamic string field types for synthetic events To: Tom Zanussi Cc: Steven Rostedt , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 25, 2020 at 12:48 PM Tom Zanussi wrote: > > Hi Axel, > > On Fri, 2020-09-25 at 12:08 -0700, Axel Rasmussen wrote: > > Hi Steven and Tom, > > > > In this thread: https://lkml.org/lkml/2020/9/17/1015 we discussed how > > to plumb > > dynamic strings into synthetic events. Tom, you proposed adding a new > > dynamic > > string type to synthetic event definition like "char foo[]". > > > > I'm sending this patch because it may be simpler than implementing > > that (I'm > > not too familiar with the tracing infrastructure, apologies if this > > is not > > true), and in my testing it seems sufficient to address my use case. > > I tested > > both setting up a synthetic event as Steven described in the other > > thread, as > > well as doing an analogous thing with a small bpftrace program, and > > both work as > > expected with this patch. > > > > This is because I happen to know there's an upper bound on the length > > of the > > string in question, so I can just define a "char memcg_path[256]" in > > the > > synthetic event, and I can be sure the string won't be truncated. > > > > Let me know what you think. Happy to drop this and wait for Tom's > > suggested > > approach instead. > > Changing check_synth_field() is one of the things that will need to > change for this to work - I'm working on a patch but am kind of in the > middle of it, if you can wait - I expect to be able to post something > Monday... > > Thanks, > > Tom Absolutely, no problem waiting. I didn't mean to come off as being impatient; mostly since I had already hacked this together a few days ago, I figured it was worth an e-mail in case it could save you some effort. I have no problem dropping it. :) Thanks for working on this! > > > > > Axel Rasmussen (1): > > tracing: support dynamic string field types for synthetic events > > > > kernel/trace/trace_events_hist.c | 15 ++++++++++++--- > > 1 file changed, 12 insertions(+), 3 deletions(-) > > > > -- > > 2.28.0.681.g6f77f65b4e-goog > > >