<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Feb 14, 2012, at 6:00 PM, Jim Grosbach wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div><font class="Apple-style-span">+  // Calls op_open_agent in the oprofile JIT library and saves the returned op_agent_t</font></div><div><font class="Apple-style-span">+  // handle internally so it can be used when calling all the other op_* functions. Callers</font></div><div><font class="Apple-style-span">+  // of this class do not need to keep track of op_agent_t objects.</font></div><div><font class="Apple-style-span">+  bool open_agent();</font></div><div><font class="Apple-style-span">+</font></div><div><font class="Apple-style-span">+  int close_agent();</font></div><div><font class="Apple-style-span">+  int write_native_code(const char* name,</font></div><div><font class="Apple-style-span">+                        uint64_t addr,</font></div><div><font class="Apple-style-span">+                        void const* code,</font></div><div><font class="Apple-style-span">+                        const unsigned int size);</font></div><div><font class="Apple-style-span">+  int write_debug_line_info(void const* code,</font></div><div><font class="Apple-style-span">+                            size_t num_entries,</font></div><div><font class="Apple-style-span">+                            struct debug_line_info const* info);</font></div><div><font class="Apple-style-span">+  int unload_native_code(uint64_t addr);</font></div><div><font class="Apple-style-span">+  int major_version(void);</font></div><div><font class="Apple-style-span">+  int minor_version(void);</font></div><div><font class="Apple-style-span">+</font></div><div><font class="Apple-style-span">+  // Returns true if the oprofiled process is running, the opagent library is loaded</font></div><div><font class="Apple-style-span">+  // and a connection to the agent has been established, and false otherwise.</font></div><div><font class="Apple-style-span">+  bool have_agent();</font></div><div><font class="Apple-style-span">+</font></div></blockquote><br><div>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.</div></div></div></span></blockquote><br></div><div>If this is matching an existing library, then using the same name as the library makes sense.  If not, it should follow the convention.  </div><div><br></div><div>One other minor nit:</div><div><br></div><div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000">+</font></div><div><font class="Apple-style-span" color="#000000">+#include <stdint.h></font></div></blockquote><div><div><font class="Apple-style-span" color="#000000"><br></font></div></div><div><font class="Apple-style-span" color="#000000">Please use llvm/Support/DataTypes.h.  stdint.h has some portability issues.</font></div></div><div><br></div><div>Thanks guys,</div><div><br></div><div>-Chris</div></body></html>