From nobody Sat Apr 20 04:19:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1595763155; cv=none; d=zohomail.com; s=zohoarc; b=CRkp4GJPI9oUoZYAv0+xV/KFbyHul9oE2ShDXA4rFQbwGrE+BUSFG1DkFGIDnE5PMD2Mgk0JDIRd7XutTYpeRn5luFXElRLgWbSArDP4Hvw4tV/H5qK/LiOFm2iUJkq6lr7xu0u8ak5NL6a3pLYTsGld8qCGZo45D/RpV4tpctQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595763155; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=hPz900zUwDz11P+mVuIotxcBIath7M/iAI8iRvGzH6A=; b=g9qD221IIHGRBuRIH31BP54h2En9SFBxOLzjOpiLwY/l29MqtBw92wZrBfbBYfaGdla5Orou9fXHHb9Jrqwe5LH+w0qqCFWmNdYESebwfD33god3PQ7uu05aBinpRIzIBZwlp00dJBhnu/j3hO10+iVK5YdSIAhWxBHp1El7XfY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1595763155665139.70222170753982; Sun, 26 Jul 2020 04:32:35 -0700 (PDT) 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-195-wUOdKfjyPM-TlPUfumQv4g-1; Sun, 26 Jul 2020 07:32:29 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A210C91270; Sun, 26 Jul 2020 11:32:22 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 18BE389503; Sun, 26 Jul 2020 11:32:19 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9B472730C3; Sun, 26 Jul 2020 11:32:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06QBW9jl001157 for ; Sun, 26 Jul 2020 07:32:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id D5F7B5D9F1; Sun, 26 Jul 2020 11:32:09 +0000 (UTC) Received: from hansolo.redhat.com (ovpn-12-63.pek2.redhat.com [10.72.12.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC5D25D9E8; Sun, 26 Jul 2020 11:32:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595763151; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=hPz900zUwDz11P+mVuIotxcBIath7M/iAI8iRvGzH6A=; b=H6fdvmHMpdt/sFkD0a6F5jraPedCVOWdIpsAnhUahYrVmYdhvZ16Vw1I+H0H0nq8lnh7+D WUpXnRbll4kjyy3TmfVQCmHcdfRQgHQDyRpz+iJ+nVRWV7TjbyKMlLIStRmW/fyhoh752q fKXXIbRDo31ZiW0HGN/S72OZAYgbdmc= X-MC-Unique: wUOdKfjyPM-TlPUfumQv4g-1 From: Han Han To: libvir-list@redhat.com Subject: [PATCH] examples: Use event loop impl in events.stp Date: Sun, 26 Jul 2020 19:32:02 +0800 Message-Id: <20200726113202.1295159-1-hhan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Han Han X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Update the events stap example because the event loop impl is replaced by GLib based event loop impl after commit 55fe8110. Signed-off-by: Han Han --- examples/systemtap/events.stp | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/examples/systemtap/events.stp b/examples/systemtap/events.stp index fd4fe4664d..016e2ca048 100644 --- a/examples/systemtap/events.stp +++ b/examples/systemtap/events.stp @@ -89,44 +89,34 @@ probe begin { print_ts("begin"); } =20 -probe libvirt.event_poll.add_handle { +probe libvirt.event_glib.add_handle { print_ts(sprintf("%d + handle %d %d %d", pid(), watch, fd, events)); } -probe libvirt.event_poll.remove_handle { +probe libvirt.event_glib.remove_handle { print_ts(sprintf("%d - handle %d", pid(), watch)); } -probe libvirt.event_poll.update_handle { +probe libvirt.event_glib.update_handle { if (showUpdates) print_ts(sprintf("%d * handle %d %d", pid(), watch, events)); } -probe libvirt.event_poll.purge_handle { - print_ts(sprintf("%d ! handle %d", pid(), watch)); -} -probe libvirt.event_poll.dispatch_handle { +probe libvirt.event_glib.dispatch_handle { if (showDispatch) print_ts(sprintf("%d > handle %d %d", pid(), watch, events)); } =20 -probe libvirt.event_poll.add_timeout { +probe libvirt.event_glib.add_timeout { print_ts(sprintf("%d + timeout %d %d", pid(), timer, frequency)); } -probe libvirt.event_poll.remove_timeout { +probe libvirt.event_glib.remove_timeout { print_ts(sprintf("%d - timeout %d", pid(), timer)); } -probe libvirt.event_poll.update_timeout { +probe libvirt.event_glib.update_timeout { if (showUpdates) print_ts(sprintf("%d * timeout %d %d", pid(), timer, frequency)); } -probe libvirt.event_poll.purge_timeout { - print_ts(sprintf("%d ! timeout %d", pid(), timer)); -} =20 -probe libvirt.event_poll.dispatch_timeout { +probe libvirt.event_glib.dispatch_timeout { if (showDispatch) print_ts(sprintf("%d > timeout %d", pid(), timer)); } =20 -probe libvirt.event_poll.run { - if (showIter) - print_ts(sprintf("%d ~ %d %d", pid(), nfds, timeout)); -} --=20 2.27.0