lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 22 Jul 2010 19:13:50 +0800
From:	Lin Ming <ming.m.lin@...el.com>
To:	Ingo Molnar <mingo@...e.hu>,
	Reinette Chatre <reinette.chatre@...el.com>
Cc:	Robert Richter <robert.richter@....com>,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	Johannes Berg <johannes@...solutions.net>,
	Peter Zijlstra <peterz@...radead.org>,
	Greg KH <greg@...ah.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Paul Mundt <lethal@...ux-sh.org>,
	"eranian@...il.com" <eranian@...il.com>,
	"Gary.Mohr@...l.com" <Gary.Mohr@...l.com>,
	"arjan@...ux.intel.com" <arjan@...ux.intel.com>,
	"Zhang, Yanmin" <yanmin_zhang@...ux.intel.com>,
	Paul Mackerras <paulus@...ba.org>,
	"David S. Miller" <davem@...emloft.net>,
	Russell King <rmk+kernel@....linux.org.uk>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Will Deacon <will.deacon@....com>,
	Maynard Johnson <mpjohn@...ibm.com>,
	Carl Love <carll@...ibm.com>,
	Kay Sievers <kay.sievers@...y.org>,
	lkml <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Steven Rostedt <rostedt@...dmis.org>
Subject: [RFC][PATCH v1 06/15] perf: export tracepoint events via sysfs:
 iwlwifi and iwlwifi_io

iwlwifi and iwlwifi_io tracepoint events are exported like below,

/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/net/wlan0/events/
|-- iwlwifi_dev_hcmd
|   |-- config
|   |-- type
|-- iwlwifi_dev_rx
|   |-- config
|   |-- type
....
....
|-- iwlwifi_dev_ioread32
|   |-- config
|   |-- type
|-- iwlwifi_dev_iowrite32
|   |-- config
|   |-- type
|-- iwlwifi_dev_iowrite8
|   |-- config
|   |-- type
---
 drivers/net/wireless/iwlwifi/iwl3945-base.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index a27872d..cbcc2bb 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -41,6 +41,7 @@
 #include <linux/firmware.h>
 #include <linux/etherdevice.h>
 #include <linux/if_arp.h>
+#include <linux/perf_event.h>
 
 #include <net/ieee80211_radiotap.h>
 #include <net/mac80211.h>
@@ -3989,6 +3990,18 @@ static int iwl3945_setup_mac(struct iwl_priv *priv)
 	return 0;
 }
 
+static void iwl_sys_add_tp(struct kobject *kobj)
+{
+	struct kobject *events_kobj;
+
+	events_kobj = perf_sys_create_events_dir(kobj);
+	if (!events_kobj)
+		return;
+
+	perf_sys_add_tp_events(events_kobj, "iwlwifi");
+	perf_sys_add_tp_events(events_kobj, "iwlwifi_io");
+}
+
 static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
 	int err = 0;
@@ -4148,6 +4161,8 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
 		goto out_release_irq;
 	}
 
+	iwl_sys_add_tp(&pdev->dev.kobj);
+
 	iwl_set_rxon_channel(priv,
 			     &priv->bands[IEEE80211_BAND_2GHZ].channels[5]);
 	iwl3945_setup_deferred_work(priv);



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ