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