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

Rules definitions in Intel Inspector

Jorge_Costa
Beginner
1,038 Views

Hi all,

We are using intel inspector in command line, and producing csv files. We have reports like

"X1882","P9","Kernel resource leak"

Is it possible to know the complete list of rules the inspector checks. Im using intel inspector 2013.

Thanks in advance

Jorge Costa

0 Kudos
8 Replies
Peter_W_Intel
Employee
1,038 Views

As I know that Inspector can detect "resource leak" within "memory error analysis". Resource leak means that some kernel objects are created but never closed (destroyed) in your code.  Actually Inspector traces all Win Object APIs called by your code to find errors.

If you wont the tool to report such errors, just use option "-knob resources=false" in command line. 

0 Kudos
Jorge_Costa
Beginner
1,038 Views

Hi Peter,

It seems i was not clear enough, sorry. What i try to do is import intel report into sonar (http://www.sonarsource.com/). For that i need a profile with the intel rules. But i can find them anywhere. So basically, for each rule a id, description and criticality is needed to display something in sonar.

Is there such a thing?

Thanks in advance 

Jorge Costa

0 Kudos
SergeyKostrov
Valued Contributor II
1,038 Views
>>...What i try to do is import intel report into sonar... I think it is better to look from the side of Sonar. So, what rules are supported in that application? Could you provide some details?
0 Kudos
Jorge_Costa
Beginner
1,038 Views

Hi Sergey,

Sonar supports anything we want, as it does not run Intel Inspector. Its me that will run intel inspector, and produce a report with violations. This is a simple csv file that is converted into xml that sonar understands. Nothing fancy here.

On Sonar for the rules to be imported, they simple need to be defined in a quality profile. I also define this by providing to sonar a xml file like this:

<?xml version="1.0" encoding="ASCII"?>

<rules>
<rule key="cpplint.readability/nolint-0">
<name><![CDATA[ Unknown NOLINT error category: %s % category]]></name>
<configKey><![CDATA[cpplint.readability/nolint-0@CPP_LINT]]></configKey>
<category name="readability" />
<description><![CDATA[ Unknown NOLINT error category: %s % category ]]></description>
</rule>

</rules>

Now i need the same xml file populated with intel rules like this for example:

<rule key="intel.error">
<name><![CDATA[ This is a memory leak]]></name>
<configKey><![CDATA[intel.error]]></configKey>
<category name="memory" />
<description><![CDATA[  This is a memory leak ]]></description>
</rule>

However i want the description and rule key to be matching those of intel for example in the csv file produces:

"Error","X1848","P4","Kernel resource leak"

So i could get a description of what X1848 and P4 mean would be great.

0 Kudos
SergeyKostrov
Valued Contributor II
1,038 Views
Hi Jorge, My understanding is that you need a small helper application that converts Intel Inspector XE xml-file to Sonar xml-file format. I'm Not sure that Intel Inspector will do it or has it by default. You need to proceed with your own implementation using some light XML library freely available on the web.
0 Kudos
Jorge_Costa
Beginner
1,038 Views

Hi Sergey,

Thats cover already (python script), and im able to get violations in sonar no problem. However i have 2 rules relevant intel inspector. One is intel.warning and another intel.error . What i want now is more granularity, so i need to translate those Ids Xxxxx into something more reasonable for users to see.

Im mean is there any document in your side that describes those "X1882","P9" ids?

thanks

br,

Jorge Costa

0 Kudos
Mark_D_Intel
Employee
1,038 Views

The id's starting with X's identify code locations (also called observations) - you can look this up in the help.  I think you can ignore these.

The id's starting with P's identify problems.   Entries with the same problem id are related (except for the 'memory not deallocated' problem) - they are different code locations related to the same problem (the allocation site, the site of the uninitialized read, etc).

The 'Problem Type Reference' section in the documentation should give the list of rules Inspector checks.  (It won't give the exact wording, though, that you need to process the CSV file.)

0 Kudos
Jorge_Costa
Beginner
1,038 Views

Many thanks Mark,

Now its clear what i need to do, thanks a lot for the help.

Br,

Jorge Costa

0 Kudos
Reply