]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
dtrace: test the new DTRACE_PROBE() n-argument macro
authorNick Alcock <nick.alcock@oracle.com>
Fri, 16 Sep 2016 09:32:42 +0000 (10:32 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 28 Oct 2016 13:01:19 +0000 (14:01 +0100)
Also verify that all eight of its arg-taking forms, as well as its
existing non-arg-taking form, work.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Acked-by: Kris Van Hees <kris.van.hees@oracle.com>
Orabug: 24678897

dtrace/dt_test_dev.c

index da14419f04695fffa1973a9e4422e444b7993c4b..f833fe9b26df07d1bc25b7dc0e13f37f7270ca26 100644 (file)
@@ -101,16 +101,29 @@ static long dt_test_ioctl(struct file *file,
 
        DTRACE_PROBE(sdt__test);
 
+       /*
+        * Test translation-to-nothing.
+        */
+       DTRACE_PROBE(sdt__test__ioctl__file, int, cmd, int :, 666,
+                    char * : (), 0, struct file *, file, int, arg);
+
+       /*
+        * Probes with every valid count of args.
+        */
+       DTRACE_PROBE(sdt__test__arg1, int, 1);
+       DTRACE_PROBE(sdt__test__arg2, int, 1, int, 2);
+       DTRACE_PROBE(sdt__test__arg3, int, 1, int, 2, int, 3);
+       DTRACE_PROBE(sdt__test__arg4, int, 1, int, 2, int, 3, int, 4);
+       DTRACE_PROBE(sdt__test__arg5, int, 1, int, 2, int, 3, int, 4, int, 5);
+       DTRACE_PROBE(sdt__test__arg6, int, 1, int, 2, int, 3, int, 4, int, 5, int, 6);
+       DTRACE_PROBE(sdt__test__arg7, int, 1, int, 2, int, 3, int, 4, int, 5, int, 6, int, 7);
+       DTRACE_PROBE(sdt__test__arg8, int, 1, int, 2, int, 3, int, 4, int, 5, int, 6, int, 7, int, 8);
+
        return -EAGAIN;
 }
 
 static int dt_test_open(struct inode *inode, struct file *file)
 {
-       /*
-        * Test translation-to-nothing.
-        */
-       DTRACE_PROBE4(sdt__test__open__file, struct inode *,inode, int :, 666,
-                     char * : (), 0, struct file *, file);
        return 0;
 }