Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3631261pxu; Tue, 15 Dec 2020 11:24:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJz19Ptvx2gNtX360tUrpMkDZ3B4reoQvxUjZgSX+2gts+2Kq/zOFrKJfNY/mj/06JI+isRc X-Received: by 2002:a17:906:7f13:: with SMTP id d19mr29307389ejr.54.1608060289557; Tue, 15 Dec 2020 11:24:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608060289; cv=none; d=google.com; s=arc-20160816; b=MOjRIzH5l7BqeDxlsDkpqTkruo98UKsI3jI9tbhv031EqQ3hdLNk/9Tla8Zq/VOH+4 CMzwGAfxxtssGbGMErBK+KrJWHQkNJ7jfSLkbjLS8We84HEh5vCz3OGJVb0iXf1krfkj lUiIv25h2qjowUOJh5Pi5vQiTqwH8LCt4+k71JZ2yACoucKX9jJe5QWn26WSslq4Y1Cq ADJj5bIritp9ozOQvoAylS+wmVrBNWWvvwcrGWE8vN2+UFeRUbQ1MascsJHHPpUCeDBD PzItwVI7G16HEp5e1D+3f9XYux92HYd2SP7Uaahd0x0k0DCTmOC/wGWxS6LDgvysCyKR ThQA== 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=e9Ft2jf7WLx7YMIoenNJ17dYCnQX+WoOOkTwQ2EE+ss=; b=NOhiBMCzceFgO6W3sZ3ayx5XU5BwgXwzbFR/0l1jXIaz8TR4nOP4FjItk5isqKTI9n xGuEk3EuAqAXDC3kjWjhsoJZDJVdGP5DAiPywXXb0pnHjz4WQhPmB48G4/3TtVrOU6sV SNGKFjgGEi1/dTFc8k2sop6UxtRuPUuEd73WzoFbHfUfF8Anut+g2d3ftVjP/jlYuPfS F6i+X5tsbzl5oLuy1ytM3KbLcHiB8j3MZiBUz2Erq+huB5FDCLhQiTCZOJMd/OhthHDs 2uhHzjWfSxHNDrr9ZW4jGvwQw7GotlLeXMXXPWhUdiBbS1Mm44kyWnCPPYR9zzndiCOw 8k/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Bo7qOJhn; 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 cb20si1348463ejb.329.2020.12.15.11.24.24; Tue, 15 Dec 2020 11:24:49 -0800 (PST) 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=Bo7qOJhn; 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 S1732013AbgLOTWD (ORCPT + 99 others); Tue, 15 Dec 2020 14:22:03 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:57181 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732010AbgLOTVv (ORCPT ); Tue, 15 Dec 2020 14:21:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608060025; 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=e9Ft2jf7WLx7YMIoenNJ17dYCnQX+WoOOkTwQ2EE+ss=; b=Bo7qOJhn3BslHy1jGZjg54+4B7/khL0UtQtaBTVkZv7DVYNt1iauxR4e/pw/wEeigQ19gL ptDQRnr1tou5ylc7mPdEXwvmtrnyA6sSygppHVq1q6OSoeF36f6NcthL/L9spCWjeFaHEy +5/wVlWZFbmp5uSpzFDgbumBgMGcDYU= 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-112-cphLiQH2M2-vuCnVRn7KdA-1; Tue, 15 Dec 2020 14:20:23 -0500 X-MC-Unique: cphLiQH2M2-vuCnVRn7KdA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 733A8100A440; Tue, 15 Dec 2020 19:20:20 +0000 (UTC) Received: from krava (ovpn-112-106.ams2.redhat.com [10.36.112.106]) by smtp.corp.redhat.com (Postfix) with SMTP id B27B95D9D7; Tue, 15 Dec 2020 19:20:17 +0000 (UTC) Date: Tue, 15 Dec 2020 20:20:16 +0100 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , lkml , Peter Zijlstra , Ingo Molnar , Mark Rutland , Namhyung Kim , Alexander Shishkin , Michael Petlan , Ian Rogers , Stephane Eranian , Alexei Budankov Subject: Re: [PATCH 4/8] perf daemon: Add daemon command Message-ID: <20201215192016.GG698181@krava> References: <20201212104358.412065-1-jolsa@kernel.org> <20201212104358.412065-5-jolsa@kernel.org> <20201215154408.GE258566@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201215154408.GE258566@kernel.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 15, 2020 at 12:44:08PM -0300, Arnaldo Carvalho de Melo wrote: > Em Sat, Dec 12, 2020 at 11:43:54AM +0100, Jiri Olsa escreveu: > > Adding daemon command that allows to run record sessions > > on background. Each session represents one perf record > > process and is configured in config file. > > > > Example: > > > > # cat config.daemon > > [daemon] > > base=/opt/perfdata > > > > [session-1] > > run = -m 10M -e cycles -o /opt/perfdata/1/perf.data --overwrite --switch-output -a > > > > [session-2] > > run = -m 20M -e sched:* -o /opt/perfdata/2/perf.data --overwrite --switch-output -a > > > > Default perf config has the same daemon base: > > > > # cat ~/.perfconfig > > [daemon] > > base=/opt/perfdata > > > > Starting the daemon: > > > > # perf daemon --config config.daemon > > > > Check sessions: > > "Check"? You mean that using 'perf daemon' without any args will just > attach to whatever daemon is running and list the current sessions? > > So we can only have one daemon running in a machine? > > That seems constraining, perhaps we can give each daemon a name? as I explained in the other email, the difference is the base path specified for both daemon and other commands I made other changes showing line for daemon process itself with base path: $ sudo /opt/perf/bin/perf daemon [690174:daemon] base: /opt/perfdata [690175:top] perf record -e cycles --switch-output=1m --switch-max-files=6 -a $ sudo /opt/perf/bin/perf daemon -v [690174:daemon] base: /opt/perfdata output: /opt/perfdata/output lock: /opt/perfdata/lock up: 268 minutes [690175:top] perf record -e cycles --switch-output=1m --switch-max-files=6 -a base: /opt/perfdata/top output: /opt/perfdata/top/output control: /opt/perfdata/top/control ack: /opt/perfdata/top/ack up: 268 minutes jirka