Providing users with thread type
Jean Christophe Beyler
jcbeyler at google.com
Fri Apr 19 21:39:31 UTC 2019
Hi Florian and Thomas,
@ both: apparently our internal jobs have a tendency to rename threads so
all the naming is out the window (it is not clear to me why this happens)
It looks like IF I could get that fixed this might work but does seem a bit
"hacky" at best, is there no good solution to put the code I pasted above
somewhere so that we could call it at some point?
I'm wondering if it would be just appropriate to maybe augment
AsyncGetCallTrace (since we call that at the same time) and perhaps fill an
extra type parameter... Something like:
void AsyncGetCallTraceWithType(ASGCT_CallTrace *trace, jint depth, void*
ucontext, ASGCT_ThreadType* thread_type)
Or augment ASGCT_CallTrace with the extra information in there:
typedef struct {
JNIEnv *env_id; // Env where trace was recorded
jint num_frames; // number of frames in this trace
ASGCT_CallFrame *frames; // frames
ASGCT_ThreadType thread_type; // type of event recorded: java,
compiler, gc, vm
} ASGCT_CallTrace;
Any opinions?
Thanks for your help,
Jc
On Fri, Apr 19, 2019 at 1:26 PM Florian Weimer <fweimer at redhat.com> wrote:
> * Jean Christophe Beyler:
>
> > Is there any way we could provide that (not in JVMTI then)?
>
> On Linux, you can get truncated thread names from /proc/PID/task/*/comm.
> Maybe that's sufficient for your needs?
>
> Thanks,
> Florian
>
--
Thanks,
Jc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20190419/e0c2b26f/attachment.html>
More information about the serviceability-dev
mailing list