[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1279797198.20942.86.camel@minggr.sh.intel.com>
Date: Thu, 22 Jul 2010 19:13:18 +0800
From: Lin Ming <ming.m.lin@...el.com>
To: Ingo Molnar <mingo@...e.hu>, Dave Airlie <airlied@...hat.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 05/15] perf: export tracepoint events via sysfs:
i915
i915 tracepoint events are exported like below,
/sys/devices/pci0000:00/0000:00:02.0/drm/card0/events
|-- i915_gem_object_bind
| |-- config
| |-- type
|-- i915_gem_object_change_domain
| |-- config
| |-- type
....
....
---
drivers/gpu/drm/i915/i915_drv.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 423dc90..185b502 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -28,6 +28,7 @@
*/
#include <linux/device.h>
+#include <linux/perf_event.h>
#include "drmP.h"
#include "drm.h"
#include "i915_drm.h"
@@ -413,7 +414,17 @@ int i965_reset(struct drm_device *dev, u8 flags)
static int __devinit
i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
- return drm_get_dev(pdev, ent, &driver);
+ struct drm_device *drm_dev;
+ int ret;
+
+ ret = drm_get_dev(pdev, ent, &driver);
+
+ if (!ret) {
+ drm_dev = pci_get_drvdata(pdev);
+ perf_sys_add_tp(&drm_dev->primary->kdev.kobj, "i915");
+ }
+
+ return ret;
}
static void
--
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