From: Eugene Loh <[email protected]>
Signed-off-by: Eugene Loh <[email protected]>
---
test/triggers/ustack-tst-bigstack.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/test/triggers/ustack-tst-bigstack.c b/test/triggers/ustack-tst-bigstack.c
index e694a518c..267b07e74 100644
--- a/test/triggers/ustack-tst-bigstack.c
+++ b/test/triggers/ustack-tst-bigstack.c
@@ -10,6 +10,10 @@
#include <unistd.h>
#include <sys/ioctl.h>
+/*
+ * Create a ridiculously large stack - enough to push us over
+ * the default setting of 'kernel.perf_event_max_stack' (127).
+ */
int limit = 4096;
int grow1(int);
@@ -23,14 +27,6 @@ shouldGrow(int frame)
int
grow(int frame)
{
- /*
- * Create a ridiculously large stack - enough to push us over
- * the default setting of 'dtrace_ustackdepth_max' (2048).
- *
- * This loop used to repeatedly call getpid(), but on Linux the result
- * of that call gets cached, so that repeated calls actually do not
- * trigger a system call anymore. We use ioctl() instead.
- */
if (shouldGrow(frame))
frame = grow1(frame++);
--
2.47.3
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.