From: Nick Alcock Date: Fri, 16 Sep 2016 09:32:42 +0000 (+0100) Subject: dtrace: test the new DTRACE_PROBE() n-argument macro X-Git-Tag: v4.1.12-111.0.20170907_2225~3^2~3^2~36 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f3ef46faa11dbeb78a237dd305ae596447dfa562;p=users%2Fjedix%2Flinux-maple.git dtrace: test the new DTRACE_PROBE() n-argument macro 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 Acked-by: Kris Van Hees Orabug: 24678897 --- diff --git a/dtrace/dt_test_dev.c b/dtrace/dt_test_dev.c index da14419f0469..f833fe9b26df 100644 --- a/dtrace/dt_test_dev.c +++ b/dtrace/dt_test_dev.c @@ -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; }