From patchwork Mon Mar 12 09:09:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg Kurz X-Patchwork-Id: 884353 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kaod.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 400C0F47GKz9sQv for ; Mon, 12 Mar 2018 20:11:25 +1100 (AEDT) Received: from localhost ([::1]:57231 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evJUJ-0005FI-C0 for incoming@patchwork.ozlabs.org; Mon, 12 Mar 2018 05:11:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evJSh-0004M0-Ov for qemu-devel@nongnu.org; Mon, 12 Mar 2018 05:09:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evJSc-0001DT-MR for qemu-devel@nongnu.org; Mon, 12 Mar 2018 05:09:43 -0400 Received: from 4.mo4.mail-out.ovh.net ([178.32.98.131]:40948) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1evJSc-0000nd-Eu for qemu-devel@nongnu.org; Mon, 12 Mar 2018 05:09:38 -0400 Received: from player693.ha.ovh.net (unknown [10.109.122.93]) by mo4.mail-out.ovh.net (Postfix) with ESMTP id 2A005156DCC for ; Mon, 12 Mar 2018 10:09:28 +0100 (CET) Received: from bahia.lan (lns-bzn-46-82-253-208-248.adsl.proxad.net [82.253.208.248]) (Authenticated sender: groug@kaod.org) by player693.ha.ovh.net (Postfix) with ESMTPA id 592D44400D2; Mon, 12 Mar 2018 10:09:26 +0100 (CET) From: Greg Kurz To: qemu-devel@nongnu.org Date: Mon, 12 Mar 2018 10:09:19 +0100 Message-ID: <152084575964.24079.3708480492746701627.stgit@bahia.lan> User-Agent: StGit/0.17.1-46-g6855-dirty MIME-Version: 1.0 X-Ovh-Tracer-Id: 4883872322894272832 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtfedrledvgdejgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecu X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 178.32.98.131 Subject: [Qemu-devel] [PATCH] 9p: add trace event for v9fs_setattr() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kurz Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Don't print the tv_nsec part of atime and mtime, to stay below the 10 argument limit of trace events. Signed-off-by: Greg Kurz Reviewed-by: Philippe Mathieu-Daudé --- hw/9pfs/9p.c | 5 +++++ hw/9pfs/trace-events | 2 ++ 2 files changed, 7 insertions(+) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 64f3bb976c92..33825e16c150 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -1196,6 +1196,10 @@ static void coroutine_fn v9fs_setattr(void *opaque) goto out_nofid; } + trace_v9fs_setattr(pdu->tag, pdu->id, fid, + v9iattr.valid, v9iattr.mode, v9iattr.uid, v9iattr.gid, + v9iattr.size, v9iattr.atime_sec, v9iattr.mtime_sec); + fidp = get_fid(pdu, fid); if (fidp == NULL) { err = -EINVAL; @@ -1260,6 +1264,7 @@ static void coroutine_fn v9fs_setattr(void *opaque) } } err = offset; + trace_v9fs_setattr_return(pdu->tag, pdu->id); out: put_fid(pdu, fidp); out_nofid: diff --git a/hw/9pfs/trace-events b/hw/9pfs/trace-events index 1aee350c42f1..881e4c4dd80b 100644 --- a/hw/9pfs/trace-events +++ b/hw/9pfs/trace-events @@ -46,3 +46,5 @@ v9fs_xattrwalk_return(uint16_t tag, uint8_t id, int64_t size) "tag %d id %d size v9fs_xattrcreate(uint16_t tag, uint8_t id, int32_t fid, char* name, uint64_t size, int flags) "tag %d id %d fid %d name %s size %"PRIu64" flags %d" v9fs_readlink(uint16_t tag, uint8_t id, int32_t fid) "tag %d id %d fid %d" v9fs_readlink_return(uint16_t tag, uint8_t id, char* target) "tag %d id %d name %s" +v9fs_setattr(uint16_t tag, uint8_t id, int32_t fid, int32_t valid, int32_t mode, int32_t uid, int32_t gid, int64_t size, int64_t atime_sec, int64_t mtime_sec) "tag %u id %u fid %d iattr={valid %d mode %d uid %d gid %d size %"PRId64" atime=%"PRId64" mtime=%"PRId64" }" +v9fs_setattr_return(uint16_t tag, uint8_t id) "tag %u id %u"