From patchwork Mon Jun 19 12:49:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 777737 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.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 3wrrZZ5t0kz9s89 for ; Mon, 19 Jun 2017 22:56:22 +1000 (AEST) Received: from localhost ([::1]:42427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMwE8-0000Gg-FY for incoming@patchwork.ozlabs.org; Mon, 19 Jun 2017 08:56:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMw8r-0003Cq-TB for qemu-devel@nongnu.org; Mon, 19 Jun 2017 08:50:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMw8q-0004x5-Un for qemu-devel@nongnu.org; Mon, 19 Jun 2017 08:50:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35128) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dMw8q-0004wL-P7 for qemu-devel@nongnu.org; Mon, 19 Jun 2017 08:50:52 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A73A54E35B for ; Mon, 19 Jun 2017 12:50:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A73A54E35B Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=peterx@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A73A54E35B Received: from pxdev.xzpeter.org.com (ovpn-12-67.pek2.redhat.com [10.72.12.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 66BE288EF6; Mon, 19 Jun 2017 12:50:47 +0000 (UTC) From: Peter Xu To: qemu-devel@nongnu.org Date: Mon, 19 Jun 2017 20:49:43 +0800 Message-Id: <1497876588-947-9-git-send-email-peterx@redhat.com> In-Reply-To: <1497876588-947-1-git-send-email-peterx@redhat.com> References: <1497876588-947-1-git-send-email-peterx@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 19 Jun 2017 12:50:51 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 08/13] trace: add qdev_global_prop_apply 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: Laurent Vivier , Eduardo Habkost , Juan Quintela , "Dr . David Alan Gilbert" , peterx@redhat.com, Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Trace global property applying. Now there are machine compat properties, accel compat properties, and user specified global properties. It provides a way to trace those properties that really applied. Signed-off-by: Peter Xu --- Makefile.objs | 1 + hw/core/qdev-properties.c | 2 ++ hw/core/trace-events | 2 ++ 3 files changed, 5 insertions(+) create mode 100644 hw/core/trace-events diff --git a/Makefile.objs b/Makefile.objs index 0575802..e199f5d 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -121,6 +121,7 @@ trace-events-subdirs += migration trace-events-subdirs += block trace-events-subdirs += backends trace-events-subdirs += chardev +trace-events-subdirs += hw/core trace-events-subdirs += hw/block trace-events-subdirs += hw/block/dataplane trace-events-subdirs += hw/char diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index e9efb78..69c3f15 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -10,6 +10,7 @@ #include "net/hub.h" #include "qapi/visitor.h" #include "chardev/char.h" +#include "trace.h" void qdev_prop_set_after_realize(DeviceState *dev, const char *name, Error **errp) @@ -1150,6 +1151,7 @@ static void qdev_prop_set_globals_for_type(DeviceState *dev, if (strcmp(typename, prop->driver) != 0) { continue; } + trace_qdev_global_prop_apply(typename, prop->property, prop->value); prop->used = true; object_property_parse(OBJECT(dev), prop->value, prop->property, &err); if (err != NULL) { diff --git a/hw/core/trace-events b/hw/core/trace-events new file mode 100644 index 0000000..0a0a79f --- /dev/null +++ b/hw/core/trace-events @@ -0,0 +1,2 @@ +# hw/core/qdev-properties.c +qdev_global_prop_apply(const char *type, const char *prop, const char *value) "type '%s' prop '%s' value '%s'"