return _generic_indent (tid(), sprintf("%s(%d)", execname(), tid()), delta)
}
+function _generic_indent_depth:long (idx, delta)
+{
+ # pre-increment for positive delta and post-decrement for negative delta
+ x = _indent_counters[idx] + (delta > 0 ? delta : 0)
+ _indent_counters[idx] += delta
+
+ return (x>0 ? x-1 : 0)
+}
+
+/**
+ * sfunction thread_indent_depth - returns an integer corresponding to the nested-depth in the current task information
+ *
+ * @delta: the amount of increment added/removed for each call
+ *
+ * Description: This function returns an integer equal to the nested function-call depth starting
+ * from the outermost initial level. This function is useful for saving space (consumed by whitespace)
+ * in traces with long nested function calls. Use this function in a similar fashion to thread_indent(), i.e.,
+ * in call-probe, use thread_indent_depth(1) and in return-probe, use thread_indent_depth(-1)
+ */
+function thread_indent_depth:long (delta:long)
+{
+ return _generic_indent_depth (tid(), delta)
+}
+
/**
* sfunction indent - returns an amount of space to indent
*