Created attachment 153078 [details]
Picture showing the current behavior
Product Version: NetBeans IDE Dev (Build 201504020001)
Java: 1.8.0_31; Java HotSpot(TM) 64-Bit Server VM 25.31-b07
Runtime: Java(TM) SE Runtime Environment 1.8.0_31-b13
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\cendrowiczm\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\cendrowiczm\AppData\Local\NetBeans\Cache\dev
1. Set profiling point 'Reset Results' at MemoryLeakOrNot?|Example4:17
2. Run MemoryLeakOrNot?|Example4|main
3. Profile the MemoryLeakOrNot?|Example4 class by attaching profiler to external process
4. Examine the results for this profiling point.
The column Results displays the string 'No results available' constantly. On the other hand the line 17 is being called constantly during the entire runtime of Example4.
'Use defined Profiling Points' setting is not propagated to ProfilingSettings.
'Use defined Profiling Points' setting is correctly propagated to ProfilingSettings.
Everything works fine if Profiling Point is moved to line 16. It looks like there is a problem with conversion from line numbers to BCI.
LineNumberTable for default constructor of Example4 class is wrong. It is already reported as JDK bug #8061778. https://bugs.openjdk.java.net/browse/JDK-8061778
Profiler should be no longer affected by this JDK bug.
user: Tomas Hurka <firstname.lastname@example.org>
date: Wed Apr 08 09:14:20 2015 +0200
summary: bugfix #251696, special case added to handle situation when endLine is the last line of the same method as startLine