1*7c3d14c8STreehugger Robot /*===- InstrProfilingUtil.h - Support library for PGO instrumentation -----===*\ 2*7c3d14c8STreehugger Robot |* 3*7c3d14c8STreehugger Robot |* The LLVM Compiler Infrastructure 4*7c3d14c8STreehugger Robot |* 5*7c3d14c8STreehugger Robot |* This file is distributed under the University of Illinois Open Source 6*7c3d14c8STreehugger Robot |* License. See LICENSE.TXT for details. 7*7c3d14c8STreehugger Robot |* 8*7c3d14c8STreehugger Robot \*===----------------------------------------------------------------------===*/ 9*7c3d14c8STreehugger Robot 10*7c3d14c8STreehugger Robot #ifndef PROFILE_INSTRPROFILINGUTIL_H 11*7c3d14c8STreehugger Robot #define PROFILE_INSTRPROFILINGUTIL_H 12*7c3d14c8STreehugger Robot 13*7c3d14c8STreehugger Robot #include <stddef.h> 14*7c3d14c8STreehugger Robot #include <stdio.h> 15*7c3d14c8STreehugger Robot 16*7c3d14c8STreehugger Robot /*! \brief Create a directory tree. */ 17*7c3d14c8STreehugger Robot void __llvm_profile_recursive_mkdir(char *Pathname); 18*7c3d14c8STreehugger Robot 19*7c3d14c8STreehugger Robot /*! Open file \c Filename for read+write with write 20*7c3d14c8STreehugger Robot * lock for exclusive access. The caller will block 21*7c3d14c8STreehugger Robot * if the lock is already held by another process. */ 22*7c3d14c8STreehugger Robot FILE *lprofOpenFileEx(const char *Filename); 23*7c3d14c8STreehugger Robot /* PS4 doesn't have getenv. Define a shim. */ 24*7c3d14c8STreehugger Robot #if __ORBIS__ getenv(const char * name)25*7c3d14c8STreehugger Robotstatic inline char *getenv(const char *name) { return NULL; } 26*7c3d14c8STreehugger Robot #endif /* #if __ORBIS__ */ 27*7c3d14c8STreehugger Robot 28*7c3d14c8STreehugger Robot int lprofGetHostName(char *Name, int Len); 29*7c3d14c8STreehugger Robot 30*7c3d14c8STreehugger Robot unsigned lprofBoolCmpXchg(void **Ptr, void *OldV, void *NewV); 31*7c3d14c8STreehugger Robot void *lprofPtrFetchAdd(void **Mem, long ByteIncr); 32*7c3d14c8STreehugger Robot 33*7c3d14c8STreehugger Robot #endif /* PROFILE_INSTRPROFILINGUTIL_H */ 34