From patchwork Fri Sep 10 13:50:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Tzvetomir Stoyanov (VMware)" X-Patchwork-Id: 12485189 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DC2BC433F5 for ; Fri, 10 Sep 2021 13:51:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7765A611CB for ; Fri, 10 Sep 2021 13:51:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233245AbhIJNwP (ORCPT ); Fri, 10 Sep 2021 09:52:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231963AbhIJNwP (ORCPT ); Fri, 10 Sep 2021 09:52:15 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DE77C061574 for ; Fri, 10 Sep 2021 06:51:04 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id v5so2609090edc.2 for ; Fri, 10 Sep 2021 06:51:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rMOaLBqRMvoMWdOKzVzQhMu0uqXbKAZtQBql5eiesHQ=; b=H9wdH6qLTvahfo7N0ixP5Cn5y06hij62wEImPj7NBzXdwIjeYBFbGgJX42W5dcy7Mr 18zD9c595n2aQ3qHeo4VLueieRJh56u3Jvhk4bE2OqxPMYIsYHbdRIYWLBHfVjx6MebG fZhnkEtXz9WkY5uqHx07rOJDfyZF3sBi51wvY6AIzw3JHUtbLAH7o1H1izGTjOuPr5Kc +Q3IpGxDVj0/uBYLp/YO59g9371gK3L9MldKTfqrDOGhMb9i9drr4MD5QdaOhGuM8H6o OzKaJbXpgJ0s3k2EvtDgm6WQ325ZJBZzGCXc7jc25kzRbfDneklyZ5EOL07Ge/yy0ii5 C1AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rMOaLBqRMvoMWdOKzVzQhMu0uqXbKAZtQBql5eiesHQ=; b=IQRb7OHWGbGNVTtPdyg0gooXd177mEpUJhmknuJsmbEvmC67Y2mQ1jlG9MljUoNiEm pzcarfZcD1UPpQ6vEpMR+J5p92J2SQsyK054mOu9HvzOEQzI/Z7/pB7OAY/zh7KyH1Ie aqa9mFoMcKGj3Z+t6qZDqshHOZVk6gRNJ86prMosTJo/HTQaauddbraYCWNMZYEgZEfU Fq6qdSlY8pewwpjQPG31q+my7hf02eO6aY7T8biVvGUNR/bZWRtyoNOYPgCKQIkw3bPi xukmKtcgOF9xoacLzErqpzqbwUgyT0hGl9QmpnblpPTCq4SDx36F0Y/qLNQJeiNrQK6/ bReg== X-Gm-Message-State: AOAM530zWD38x6izwTEYxDnnZ7X5qYpbc36WCFVR1NV/PZ5PIk02oiNT 5rJD6n/oT8xmUOvIDIfH6w5JyldxkYY= X-Google-Smtp-Source: ABdhPJyBd2E03jHEdOWHJuM1i7siD2uoErdFWFPldCKhk1vRnNqHb76AYPz40/iPS71Q0HnPIxr/2w== X-Received: by 2002:a05:6402:318c:: with SMTP id di12mr9168357edb.55.1631281862938; Fri, 10 Sep 2021 06:51:02 -0700 (PDT) Received: from oberon.zico.biz ([83.222.187.186]) by smtp.gmail.com with ESMTPSA id w13sm2484683ejc.100.2021.09.10.06.51.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 06:51:02 -0700 (PDT) From: "Tzvetomir Stoyanov (VMware)" To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org Subject: [PATCH 00/25] Trace file version 7 - sections Date: Fri, 10 Sep 2021 16:50:36 +0300 Message-Id: <20210910135101.2865226-1-tz.stoyanov@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org Introduce the next version of the trace-cmd trace file - 7. Major changes since version 6 is more flexible extendable structure of the file, based on independent sections. Known issues: - Only trace-cmd record and report subcommands work with trace file v7. This patch-set depends on "[PATCH 00/21] trace-cmd fixes and clean-ups", should be applied on top of it: https://lore.kernel.org/linux-trace-devel/20210910134757.2863982-1-tz.stoyanov@gmail.com/ Tzvetomir Stoyanov (VMware) (25): trace-cmd library: Define trace file version 7 trace-cmd library: Add cache functionality to network message handler trace-cmd library: New APIs to get and set version of output handler trace-cmd library: Add internal helper function for writing headers before file sections trace-cmd library: Write header before file sections trace-cmd library: Add multiple options sections in trace file version 7 trace-cmd library: Do not write CPU count section in trace files version 7 trace-cmd library: Move CPU flyrecord trace metadata into the buffer option, for trace file version 7 trace-cmd record: Append trace options after the trace data are written trace-cmd library: Add section header before flyrecord trace data trace-cmd library: Fit CPU latency trace data in the new trace file version 7 format trace-cmd library: Do not write CPUs with empty trace data trace-cmd library: Add macro to check file state on reading trace-cmd library: Introduce sections in trace file reading logic trace-cmd library: Initialize internal sections database on file read trace-cmd library: Use sections database when reading parts of the trace file trace-cmd library: Read headers from trace file version 7 trace-cmd library: Read extended BUFFER option trace-cmd library: Handle the extended DONE option trace-cmd library: Initialize CPU data for reading from version 7 trace files trace-cmd library: Handle latency trace in version 7 files trace-cmd library: Handle buffer trace data init for version 7 files trace-cmd report: Use the new latency API to read data trace-cmd: Call additional APIs when creating trace file trace-cmd report: Add new parameter for trace file version include/trace-cmd/trace-cmd.h | 5 + .../include/private/trace-cmd-private.h | 27 +- lib/trace-cmd/include/trace-cmd-local.h | 14 +- lib/trace-cmd/trace-input.c | 766 ++++++++++++++---- lib/trace-cmd/trace-msg.c | 127 ++- lib/trace-cmd/trace-output.c | 594 +++++++++++--- lib/trace-cmd/trace-util.c | 2 +- tracecmd/trace-listen.c | 6 + tracecmd/trace-read.c | 18 +- tracecmd/trace-record.c | 36 +- tracecmd/trace-restore.c | 3 +- tracecmd/trace-split.c | 3 + tracecmd/trace-usage.c | 2 +- 13 files changed, 1297 insertions(+), 306 deletions(-)