From nobody Tue Apr 16 13:30:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; 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 205.139.110.61 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=1595763358; cv=none; d=zohomail.com; s=zohoarc; b=KqKrGeHnEeUxVS5yWLph3nuKICGhtJU1/vhw1nHUKQl7WJnGo5n3vQeb9KD68AyNDbZelJaCHSRf4DmJlp1AxWlZP4mHD/jUhtCBDUwRYtBTNwmgPJs6KmcfgiWMd37qZvQ6AALJMa85f9ACDm/BA/70/uKIf6Q4LnsJuvHUpVo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595763358; 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=WoUTqJcm/meP6a2UVW4hrKui640dqaub81n90I5qAsOzWn2p1GanRDMWD5YzNEJkmQRgabfyGrrJuR0A48r/yhR1Ajec/SE0mkxW8nm6FrygtzqF/LpTrq55EvnCHCqtBARTL1j2WtzDwOtdMELkNw7giW4Khj/6QzzBrAyVmWM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1595763358076183.92244328855395; Sun, 26 Jul 2020 04:35:58 -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-156-uo9vJra_OvyFmY0FYztLpg-1; Sun, 26 Jul 2020 07:35:54 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 08CEE18C63C1; Sun, 26 Jul 2020 11:35:49 +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 B25E18FA25; Sun, 26 Jul 2020 11:35:47 +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 709BC730C4; Sun, 26 Jul 2020 11:35:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06QBXMo9001299 for ; Sun, 26 Jul 2020 07:33:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id AF91F5F211; Sun, 26 Jul 2020 11:33:22 +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 346535F218; Sun, 26 Jul 2020 11:33:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595763357; 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=AyIoM8eBNckOBqdMMWjXPtnKKtuPGukDz1RtwY8ZUNx5glI63Wl7nGQuMtprCBMlBr2W2f ro6bmPubT/wSKXuIuvAfHvdjueOZ0ZrGf8b5935Or5qeuTNAQLRIWtUwr740neqFnrLerJ wm/lTp3iIDncDP54tFPa39+b6tevSEc= X-MC-Unique: uo9vJra_OvyFmY0FYztLpg-1 From: Han Han To: libvir-list@redhat.com Subject: [PATCH v2] examples: Use GLib event loop impl in events.stp Date: Sun, 26 Jul 2020 19:33:12 +0800 Message-Id: <20200726113312.1297148-1-hhan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.13 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 Reviewed-by: Daniel P. Berrang=C3=A9 --- 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