-
-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improving API for custom allocators. Adding Shutdown function. Adding support for generic FreeBSD platform - using it as a fallback if we are not on Linux or MacOS. Fixing a problem with some templated edge-cases in the Function Shortener.
- Loading branch information
Showing
11 changed files
with
181 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#pragma once | ||
#if defined(__FreeBSD__) | ||
|
||
#include "optick.config.h" | ||
#if USE_OPTICK | ||
|
||
#include "optick_core.platform.h" | ||
|
||
#include <sys/time.h> | ||
#include <sys/types.h> | ||
#include <pthread.h> | ||
#include <unistd.h> | ||
|
||
namespace Optick | ||
{ | ||
const char* Platform::GetName() | ||
{ | ||
return "PS4"; | ||
} | ||
|
||
ThreadID Platform::GetThreadID() | ||
{ | ||
return (uint64_t)pthread_self(); | ||
} | ||
|
||
ProcessID Platform::GetProcessID() | ||
{ | ||
return (ProcessID)getpid(); | ||
} | ||
|
||
int64 Platform::GetFrequency() | ||
{ | ||
return 1000000000; | ||
} | ||
|
||
int64 Platform::GetTime() | ||
{ | ||
struct timespec ts; | ||
clock_gettime(CLOCK_REALTIME, &ts); | ||
return ts.tv_sec * 1000000000LL + ts.tv_nsec; | ||
} | ||
|
||
Trace* Platform::CreateTrace() | ||
{ | ||
return nullptr; | ||
} | ||
|
||
SymbolEngine* Platform::CreateSymbolEngine() | ||
{ | ||
return nullptr; | ||
} | ||
} | ||
|
||
#endif //USE_OPTICK | ||
#endif //__FreeBSD__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.