Jprofiler session filter settings to avoid tracing of jdk calls - jprofiler

Hi could you please let me know the session filter setting to be added in jprofiler to prevent tracing of jdk internal calls?

Internal calls in the java.* packages are not measured by JProfiler in any case, regardless of your filter settings.
If you define "inclusive" filters that define the profiled classes, then all other packages are not profiled.
Note that the first call from a profiled class into a non-profiled class is always shown in the call tree, it's just the further internal calls that are not measured.

Related

Is there any way to enable extensions or features after an instance/device is created?

I'm doing some wrapper job with Vulkan, to make the API more safe, and I wondered if I can create an instance or device first, and enable extensions or features later.
First, according to the spec:
VUID-VkDeviceCreateInfo-pProperties-04451
If the VK_KHR_portability_subset extension is included in pProperties of
vkEnumerateDeviceExtensionProperties, ppEnabledExtensionNames must
include "VK_KHR_portability_subset"
This looks fine, but notice that to enable VK_KHR_portability_subset extension on a device, you must enable its dependency VK_KHR_get_physical_device_properties2, which is an instance extension. This makes the fact that an instance must enable VK_KHR_get_physical_device_properties2 anyway in case the 04451 will check when a device is creating.
Secondly, it will be convenient to enable features later, for example if a user passed some parameter in, which requires some features, I can implicitly enable them for this user.
Features and extensions are specified at creation time. They're an innate part of the instance or device from that point forward. They cannot be modified later.
You can create new instances or devices. But you can't change existing ones.

JProfiler: Why Proxy class not display in the call tree?

If I define filter with default compact config
I can see the invocation like this in the call tree-1 (this is a feign client method)
But if I define filter profiled all my source package
I can't see any invocation in the call tree-2
Actually, I wish it better to see a tree node display a proxy class call hello() like this
call stack
How could I do? Jprofiler doc say if a profiled record show in first line, all other class is compact, so I think the proxy class auto generated is compact too, why this proxy class did not show in the call tree?
Try with Dr. Ingo Kegel's answer, and got call tree-3. proxy class call feign.ReflectiveFeign$FeignInvocationHandler, why proxy disappeared?
If you define the call tree filters to com.example., neither $Proxy... nor ReflectiveFeing$FeingInvocationHandler are in the profiled classes. This means that calls into such methods will go into the inherent time of the node of the last profiled class (com.example....helloA in this case) and not have separate nodes.
With instrumentation, JProfiler does not record complete call stacks for CPU profiling. If you switch to sampling, you can disable all filters and get complete call stacks.

Run time tracing method execution - spring-cloud-sleuth provides

spring-cloud-sleuth provides way to trace method execution with #NewSpan
As it is annotation it is not feasible to add annotation on all methods of project.
Also, in production environment we only need to trace the method execution time once we find latency in execution.
Is there any way to enable tracing for Method calls at run time without restarting application?
Nothing comes out of the box for such an approach. What you can do though, is to register your own implementation of the SpanReporter. In that implementation, you could retrieve the duration for a Span and then, depending on its value, either send it to Zipkin or not (or do something else about it).

Attach console to LaunchConfiguration

I'm writing a plugin which implements the ILaunchConfigurationDelegate.
I have to override this method: launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor);
Can I attach a TextConsole to it like for the ones in the JavaApplication launch type when writing with System.out.println()?
I would like to have that in order that my launch has the same lifecycle management for its console.
Essentially my ILaunchConfiguration type is a container which holds all possible other ILaunchConfiguration types. When launching my launch container I want to log the behaviour of the others which start in a sequence. This logging would be ideal in a TextConsole. Example: 'Hello World started.' 'Hello World terminated', 'Pi approximator started' ... etc.
AFAIK, there are no extra steps necessary to redirect std in/out to the Eclipse console. The Common tab of every launch configuration type has an Allocate console option that provides this feature if enabled.
If your launch configuration type does not provide the CommonTab, you can set the IDebugUIConstants.ATTR_CAPTURE_IN_CONSOLE attribute of your ILaunchConfiguration to true.
For the container launch, you can simply allocate a TextConsole to write the log messages to. The debug/launch framework attaches consoles to IProcess instances and this won't help here but you may want to look to ProcessConsole and ProcessConsoleManager to adopt the relevant part to opening and discarding the console.
Alternatively, you could investigate if setting the ATTR_CAPTURE_IN_CONSOLE of the container launch to true and creating a dummy IProcess that satisfies the requirements of the ProcessConsoleManager wrt to consoles.

Changing Mule Flow Threading Profile at runtime

I have a requirement in hand where I need to change the Mule Flow Threading Behavior at runtime without the need of bouncing the whole Mule Container. I figured out few different ways to achieve this, but none of them are working.
I tried accessing the Mule Context Registry and from there I was trying to do a lookup of "FlowConstructLifecycleManager" Object so that I can tap in there and access the threading profile of the object and reset those values, then stop and start the flow programmatically in order to get the change applied in the flow. I am stuck in this approach as I was unable to get hold of the FlowConstructLifecycleManager Object neither from the Mule Spring Registry nor from the Transient Registry. I was able to get hold of the Flow object though which has a direct reference to that FlowConstructLifecycleManager Object. But, unfortunately, they made this object as protected and didn't expose any method for us to access this object.
Since I was unable to access this FlowConstructLifecycleManager directly from Mule implemented Flow class, I decided to extend this Flow class and just add another public method to it so that I can access FlowConstructLifecycleManager object from Flow object programmatically. But, I am stuck in this approach as well as even if I am putting my version of the same Flow class packaged and dropped in lib/user folder of the container, it is still not picking up my version of the class, and loading the original version instead.
It would be of great help if I can get any pointer on the approach of solving either my first or second problem.
Thanks in advance,
Ananya
In our company, we are building a dashboard from where we should be able to start/stop any flow or change the processing power of any flow by increasing/ decreasing the active threads for a flow or changing the pollen polling frequency. All of these should be done at runtime without any server downtime.
Anyway, I made it working finally. I had to patch up the mule-core jar and expose few objects so that I can get to the thread profile object and tweak the values at runtime and stop/ start the flow to reflect the changes to take effect. I know this is little bit messy and but it works.
Thanks,
Ananya