Hi all,

interesting idea. I think what we would need is something in JDI allowing
to do the query or trying to listen to all the monitor entered/exited
events...

Anyone familiar with those low level details?

Sven

On Mon, Feb 26, 2018 at 3:49 PM, Kyle Rose <bobo_of...@hotmail.com> wrote:

> Is the lock view in the profiler not showing this information? I got the
> impression it is.
>
> Sent from Outlook on my Pixel 2
>
> ------------------------------
> *From:* cowwoc <cow...@bbs.darktech.org>
> *Sent:* Monday, February 26, 2018 6:54:58 AM
> *To:* users@netbeans.apache.org
> *Subject:* Re: Can Netbeans do this?
>
> I agree that the debugger can do this, but it isn't easy. You'd have to
> go thread and thread and manually check the entire stack-trace for
> locks. I was also hoping that the IDE would make it easier to visualize
> this information.
>
> As an aside, the profiler has a view you might find more useful. I
> believe it is called "Thread instrumentation" or "Lock instrumentation".
> Either way, it shows you which locks each thread is holding, and waiting
> on. That, again, is moving in the right direction but not the full
> picture either.
>
> I think what is missing is a lock-centric view, where you have a list of
> locks and the sub-nodes are the threads interacting on them. This would
> make it easier to see (for example) that a lock is a point of contention
> (blocking a lot of threads).
>
> Gili
>
> On 2018-02-26 6:52 AM, Antonio wrote:
> > AFAIK the debugger can do this. Just add a breakpoint and then take a
> > look at the rest of running threads, to see what they're doing.
> >
> > Cheers,
> > Antonio
> >
> > On 26/02/18 10:04, Owen Thomas wrote:
> >> Hello.
> >>
> >> I've been working with threads, and I would like to know if the IDE
> >> can show me where I have obtained a lock (using the "synchronized"
> >> keyword) on a particular type?
> >>
> >> I think this should be something the IDE should in theory be able to
> >> do...
> >>
> >>    Owen.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
> > For additional commands, e-mail: users-h...@netbeans.apache.org
> >
> > For further information about the NetBeans mailing lists, visit:
> > https://eur01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%
> 2FNETBEANS%2FMailing%2Blists&data=02%7C01%7C%
> 7Cb360a952cc8a476e271908d57d208e70%7C84df9e7fe9f640afb435aaaaaaaa
> aaaa%7C1%7C0%7C636552501136201933&sdata=4qCj9lPoyACxCOImTmKtfUpujaflsN
> SR8Z%2Bo6yJxr8s%3D&reserved=0
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: users-h...@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://eur01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%
> 2FNETBEANS%2FMailing%2Blists&data=02%7C01%7C%
> 7Cb360a952cc8a476e271908d57d208e70%7C84df9e7fe9f640afb435aaaaaaaa
> aaaa%7C1%7C0%7C636552501136201933&sdata=4qCj9lPoyACxCOImTmKtfUpujaflsN
> SR8Z%2Bo6yJxr8s%3D&reserved=0
>
>


-- 
Sven Reimers

* Senior Expert Software Architect
* Java Champion
* NetBeans Dream Team Member: http://dreamteam.netbeans.org
* Community Leader  NetBeans: http://community.java.net/netbeans
                              Desktop Java:
http://community.java.net/javadesktop
* JUG Leader JUG Bodensee: http://www.jug-bodensee.de
* Duke's Choice Award Winner 2009

* XING: https://www.xing.com/profile/Sven_Reimers8
* LinkedIn: http://www.linkedin.com/in/svenreimers

Reply via email to