public inbox for trinity@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] perf_event_open more likely tracepoint values
@ 2013-11-14 17:35 Vince Weaver
  2013-11-14 17:33 ` Dave Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Vince Weaver @ 2013-11-14 17:35 UTC (permalink / raw)
  To: Dave Jones; +Cc: trinity


Tracepoint ids tend to be relatively small (less than 1024 or so).
This change makes it more likely to hit valid ones.

Once the fix to avoid the troublesome 0x18 (irq_work_exit)
tracepoint gets into the kernel maybe we can start stressing
things with trinity again.

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>


diff --git a/syscalls/perf_event_open.c b/syscalls/perf_event_open.c
index 2ff004e..516172a 100644
--- a/syscalls/perf_event_open.c
+++ b/syscalls/perf_event_open.c
@@ -723,9 +723,20 @@ static long long random_event_config(__u32 *event_type,
 		break;
 	case PERF_TYPE_TRACEPOINT:
 		/* Actual values to use can be found under */
-		/* debugfs tracing/events// *//*/id        */
-		/* usually a small < 1024 number           */
-		config = rand64();
+		/* debugfs tracing/events/?*?/?*?/id       */
+		/* usually a small < 4096 number           */
+		switch(rand()%2) {
+		case 0:
+			/* Try a value < 4096 */
+			config = rand()&0xfff;
+			break;
+		case 1:
+			config = rand64();
+			break;
+		default:
+			config = rand64();
+			break;
+		}
 		break;
 	case PERF_TYPE_HW_CACHE:
 		config = random_cache_config();

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-15 20:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-14 17:35 [patch] perf_event_open more likely tracepoint values Vince Weaver
2013-11-14 17:33 ` Dave Jones
2013-11-15 20:45   ` Vince Weaver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox