Re: Can Netbeans do this?

2018-02-26 Thread Owen Thomas
Hi again.

Thanks for your feedback so far...

I wasn't actually thinking of using the profiler - it was a simple
variation on "find usages" specifically intended for finding on locks
obtained for a specific type. Sometimes, I find I need to look for every
point where a particular type is being locked and the best that I know how
to find out is to scan (Ctrl-Shift-F) for "synchronized" in all my open
projects. This exercise can be quite time consuming and confusing owing to
the fact that I obtain locks on quite a few different types.

Hence, I'm looking for a variant of "find usages" that will allow me to
find all the places where a lock is obtained on a variable of a specific
type. If NB cannot currently do this, it would be a great help to have it
in a future version.


Re: Can Netbeans do this?

2018-02-26 Thread cowwoc
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://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




-
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://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Re: Can Netbeans do this?

2018-02-26 Thread Antonio
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://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Can Netbeans do this?

2018-02-26 Thread Owen Thomas
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.