[llvm-commits] [PATCH] JIT profiling support with Intel Parallel Amplifier XE 2011 (VTune)

Chris Lattner clattner at apple.com
Wed Feb 15 03:42:21 PST 2012


On Feb 14, 2012, at 6:00 PM, Jim Grosbach wrote:

>> +  // Calls op_open_agent in the oprofile JIT library and saves the returned op_agent_t
>> +  // handle internally so it can be used when calling all the other op_* functions. Callers
>> +  // of this class do not need to keep track of op_agent_t objects.
>> +  bool open_agent();
>> +
>> +  int close_agent();
>> +  int write_native_code(const char* name,
>> +                        uint64_t addr,
>> +                        void const* code,
>> +                        const unsigned int size);
>> +  int write_debug_line_info(void const* code,
>> +                            size_t num_entries,
>> +                            struct debug_line_info const* info);
>> +  int unload_native_code(uint64_t addr);
>> +  int major_version(void);
>> +  int minor_version(void);
>> +
>> +  // Returns true if the oprofiled process is running, the opagent library is loaded
>> +  // and a connection to the agent has been established, and false otherwise.
>> +  bool have_agent();
>> +
> 
> These are wrappers for API functions of the same names in the Intel library, I gather? I can see why that would be clearer to have them be identical even though it means the names aren't following the LLVM conventions. I don't have a strong opinion either way. Chris will be better able to guide us here.

If this is matching an existing library, then using the same name as the library makes sense.  If not, it should follow the convention.  

One other minor nit:

> +
> +#include <stdint.h>

Please use llvm/Support/DataTypes.h.  stdint.h has some portability issues.

Thanks guys,

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120215/d226861c/attachment.html>


More information about the llvm-commits mailing list