Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4975 Discussions

<Outside any known module>, Vtune Amplifier Error

Youngil_K_
Beginner
1,734 Views

 

Hi, everyone

Currently I'm using VTune analyzer in linux system to profiling java code.

I generated report by attaching it to the running process.

However, in top-down tree, I usually can see [Outside any known module] which took certain amount of time.

When I click it, I couldn't see any thing.

The strange thing is that sometime it can generate proper top-down report.

When vtune can generate proper report, trace file is usually about 500MB

On the other hands, when it can't generate, trace file is just about 5MB

 

There are plenty of opinion that it is because of "code on the fly".

So, I tried this steps after turning off the JIT option in jdk.

Ofcourse, I ran it under root.

But it doesn't work well.

My Ubutu version is 14.04.1 LTS

Please help me!!

Any kind of probable ideas may be helpful

Thanks

0 Kudos
1 Solution
David_A_Intel1
Employee
1,734 Views

So, two things I noticed:

  1. "-mrte-mode=native" - this limits collection to *native* code.  You should omit this option so that managed code can be profiled.
  2. In reviewing release notes, I see that we added support for attaching to Java on Linux* for hardware-based sampling, only, in Update 4 of the 2013 release.  Therefore, change your collect option to "-collect advanced-hotspots" and try again.

Hope that helps.

View solution in original post

0 Kudos
9 Replies
Peter_W_Intel
Employee
1,734 Views

Did you use supported JDK/JRE? Please see release notes. You need to use javac to build with "-g" option. 

What is command line you used amplxe-cl? VTune Amplifier XE version?

0 Kudos
Youngil_K_
Beginner
1,734 Views

 

Thank you for replying my question.

1. Did you use supported JDK/JRE?

   When I typed following command

    => java -version

   It shows like following

    => java version "1.7.0_67"

      Java(TM) SE Runtime Environment (build 1.7.0_67-b01)

      Java HotSpot(TM) 64-Bit Server VM (build 24,65-b04, mixed mode)

 

2. javac to build with "-g" option.

   When I compiled *.java file, I used command like following:

   javac -g javatest.java

   We are using VTune GUI in linux system.

   The command that GUI make automatically is like following: 

  => /opt/intel/vtune_amplifier_xe_2015.1.0.367959/bin64/amplxe-cl -collect hotspots -knob sampling-interval=1 -strategy=:trace:trace -mrte-mode=native --search-dir sym:p=/home/seungdo/workspace --target-process java

 

    And the result is like following

KakaoTalk_20141009_195811883.jpg

KakaoTalk_20141009_195812413.jpg

 

        Thank you for your help!!!!!!!!!!

0 Kudos
David_A_Intel1
Employee
1,735 Views

So, two things I noticed:

  1. "-mrte-mode=native" - this limits collection to *native* code.  You should omit this option so that managed code can be profiled.
  2. In reviewing release notes, I see that we added support for attaching to Java on Linux* for hardware-based sampling, only, in Update 4 of the 2013 release.  Therefore, change your collect option to "-collect advanced-hotspots" and try again.

Hope that helps.

0 Kudos
Youngil_K_
Beginner
1,734 Views

 

Thank you very much!!

But I have one more problem.

When I profiling with your advice, I have <unknown outside> message again like following

Outside any known.jpg

I think it is because that VTune cannot profile child process well.

When we profile, we are using attach to process method with PID information.

And when we profile with PID of child process that original process made or when we profile the process that doesn't make child process,

it could profile well without showing that error message. 

The project properties related to the child process profiling is like following:

Analyze child processes.jpg

 

Outside any known_2.jpg

 

Really appreciate for you help.

Best Regards

 

0 Kudos
Youngil_K_
Beginner
1,734 Views

To help your understanding I would like to add some more information about my problem

I guessed that maybe this <Unknown> problem is because of child process.

When I checked java process using Java VisualVM, it shows like following:

Child_Process_2.jpg

And when I give some job to daemon process (PID 7056), it generate child process like following:

Child_Process.jpg

I am sure that <unknown> error is because of this child process

Thank you for your help!

0 Kudos
Bernard
Valued Contributor I
1,734 Views

>>> am sure that <unknown> error is because of this child process

Thank you for your help!>>>

Can VTune resolve parent proces? In your case  proces PID 7056.

0 Kudos
David_A_Intel1
Employee
1,734 Views

@Youngil:

I think the problem is that when you attach to a process, any child processes already created by that process are unknown to the VTune Amplifier.  VTune Amplifier inserts hooks to recognize when a new process is created, but because they were already created *prior* to VTune Amplifier attaching the process, it has no way of knowing about the child processes.

Are you trying to profile a Java app started by Apache?  A technique we used many years ago was to modify the script that Apache uses to start the Java app and insert the VTune Amplifier command line, so that Apache starts VTune Amplifier and VTune Amplifier starts your Java app.  That way, VTune Amplifier will know all about your application, including child processes. ;)  And, if you don't want to collect all that profiling data about your app's start up, use the -start-paused option and enabling profiling once you are ready.

0 Kudos
Peter_W_Intel
Employee
1,734 Views

I wrote the article about profiling Java from Apache-Tomcat, hope it helps. 

0 Kudos
Karolina_S_Intel
Employee
1,734 Views

Check this page:

https://software.intel.com/en-us/vtune-help-enabling-linux-kernel-analysis

Make sure you set this before running the trace:

sysctl -w kernel.kptr_restrict=0

0 Kudos
Reply