Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp679886pxf; Thu, 1 Apr 2021 10:44:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQC69OQ6+fbw6/TSQcgZfNfJl3FseDlMH1/7nQ4pM1YXvHq3k96pNkOOXEgOOvo5jXZTHj X-Received: by 2002:aa7:c4cc:: with SMTP id p12mr10896372edr.325.1617299091448; Thu, 01 Apr 2021 10:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617299091; cv=none; d=google.com; s=arc-20160816; b=UZhdbU17s96/08FGTlYiZ1wjpbfO53q3Cz+xIzKnJrDrjhY+BrgeIA/1TfLFn+3Gfq iWxXKeZXKPjeJ+4wnT8n2M5jMAzsFEZSBztWSEJ2RhQ64LUNX5IW/2viRmLstxdhs7MP +VNKeoYoazeiMxujds5NRASiThNbbrYUmP0ThKuXRFOTQe+Uw2fMRM3VASHJl0MyC4kW 5pTdZJ8mV6HVSQMsYDjqldeopMXATWQPJKE8F4wDISSCTzZOAzQZEQ3Rp5psOlv1nqXo vjtxLvQEt+JnwzIgVYw1IChQ6kHjs1RPMA96SZODj6jlEhy6u+kwdHkUPsSfVaRNAGKc ydpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aTM0m+T7HagwUJawH1QxhZKr0xo014VG1/6PrsDZwlc=; b=zVsC57RQXGlTZl3O4hG6nYJoFk8auwwgHwRVzjJGznM1t2p/YAHN9OlbgmLKDuTOOq LDjK5nXA7RBm0uIpVwoNkYwenWd0lGTVNEn8iCdhMQ5j37MogpAu0OcppdrDu8Z5yZ2Z v+1g8zA6WyCwzTSBUVDMPPqHI6drL5ewNN3oX9OE+cNlAeHBn4HD/BX41Er1P9ZAcXka EBZGlkiB8yMWCGMC4iQHnvmWBZJ+y7Fl5yIr/3tK45yDjbXe1Pp7wE+HRoOrCER1apnU 3hImwuZiU5nGsBgq19t3iK0m3gCUaY5bjd4p/fzTPRG3OF6MkkT8iKIXAx+ui5/YyAR4 SYLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="O+hg/rXD"; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f1si4398362ejh.95.2021.04.01.10.44.28; Thu, 01 Apr 2021 10:44:51 -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=@redhat.com header.s=mimecast20190719 header.b="O+hg/rXD"; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234884AbhDARng (ORCPT + 99 others); Thu, 1 Apr 2021 13:43:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:43846 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234428AbhDARhW (ORCPT ); Thu, 1 Apr 2021 13:37:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617298641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=aTM0m+T7HagwUJawH1QxhZKr0xo014VG1/6PrsDZwlc=; b=O+hg/rXDUjXDxSVRw3+v8QYHeZYyqpJXTqmbxU3jjbnLEvnUd1pTvAY7O++DLkrlvzTDiq 1g2zGZoeYFp6iRzLDWpofNQo04xdufTcqe1jolwiryjcUM6nzek9rCx8kk6K4HZFnDa2v+ jwo07R9tNmqsNDBQdIGqL5cm1lv/fFc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-421-9D5ybMm_PiSVmnVMGRqGvQ-1; Thu, 01 Apr 2021 08:15:21 -0400 X-MC-Unique: 9D5ybMm_PiSVmnVMGRqGvQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B0649801814; Thu, 1 Apr 2021 12:15:19 +0000 (UTC) Received: from krava (unknown [10.40.193.98]) by smtp.corp.redhat.com (Postfix) with SMTP id 0BA0B5C233; Thu, 1 Apr 2021 12:15:16 +0000 (UTC) Date: Thu, 1 Apr 2021 14:15:16 +0200 From: Jiri Olsa To: Nicholas Fraser Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Namhyung Kim , Ian Rogers , Stephane Eranian , Tan Xiaojun , linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf data: export to JSON Message-ID: References: <4687bbe5-4ff3-af3a-fcec-06d8bfe5591c@codeweavers.com> <2d78b018-df5a-36cb-2f78-d3ca11bf9513@codeweavers.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2d78b018-df5a-36cb-2f78-d3ca11bf9513@codeweavers.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 31, 2021 at 06:38:16AM -0400, Nicholas Fraser wrote: > Hi Jiri, > > Thanks for the review. I've addressed your suggestions; some notes are > below. I'll send a new patch. > > > On 2021-03-24 2:20 p.m., Jiri Olsa wrote: > > On Wed, Mar 24, 2021 at 09:06:50AM -0400, Nicholas Fraser wrote: > >> [...] We use this to import the data into a tool on Windows > >> where integrating perf or libbabeltrace is impractical. > > > > hi, > > exciting ;-) and curious, which tool is that? > > > > The tool is called gpuvis. The perf JSON parsing support is here: > > https://github.com/ludocode/gpuvis > > The idea is to be able to line up samples from perf with GPU trace events, so > you can do things like timebox all perf samples in a particular frame of > rendering. I recall you did not add support for walltime clock, don't you need it to sync with other events? > > > > we already have zstd support compiled in for compressing samples, > > should be easy to use it for compressing the output of this right > > away > > This would require that apps that consume this integrate zstd as well. It's > simpler (both conceptually and from an integration standpoint) to just compress > on command-line if you need with whatever compressor you want. You can even do > this inline by writing to /dev/stdout, e.g.: > > perf data convert --to-json /dev/stdout --force | zstd > out.json.zstd > > Since we're transferring to Windows, more likely we'd output the JSON and then > put it in a .zip container. > > ok > > I understand not supporting opts.all or opts.tod, but 'force' > > support means just assigning 'force' to struct perf_data > > It's not clear to me what 'force' does on 'struct perf_data' since we're only > reading it. I assumed for data export it meant the output file should be > overwritten. I've made it do both in the replacement patch. > it tells perf to skip ownership validation, perf will not open other user data file if it's not forced jirka