Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 2ef00fa

Browse files
committed
Display the build platform and architecture in the JitDump
1 parent 652f1f0 commit 2ef00fa

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

src/jit/compiler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2576,6 +2576,7 @@ void Compiler::compInitOptions(CORJIT_FLAGS* jitFlags)
25762576
{
25772577
printf("****** START compiling %s (MethodHash=%08x)\n",
25782578
info.compFullName, info.compMethodHash());
2579+
printf("Generating code for %s %s\n", Target::g_tgtPlatformName, Target::g_tgtCPUName);
25792580
printf(""); // in our logic this causes a flush
25802581
}
25812582

src/jit/target.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,6 +1823,7 @@ class Target
18231823
{
18241824
public:
18251825
static const char * g_tgtCPUName;
1826+
static const char * g_tgtPlatformName;
18261827

18271828
enum ArgOrder { ARG_ORDER_R2L, ARG_ORDER_L2R };
18281829
static const enum ArgOrder g_tgtArgOrder;

src/jit/utils.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,21 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2020

2121
#include "opcode.h"
2222

23+
/*****************************************************************************/
24+
// Define the string platform name based on compilation #ifdefs. This is the
25+
// same code for all platforms, hence it is here instead of in the targetXXX.cpp
26+
// files.
27+
28+
#ifdef PLATFORM_UNIX
29+
// Should we distinguish Mac? Can we?
30+
// Should we distinguish flavors of Unix? Can we?
31+
const char * Target::g_tgtPlatformName = "Unix";
32+
#else // !PLATFORM_UNIX
33+
const char * Target::g_tgtPlatformName = "Windows";
34+
#endif // !PLATFORM_UNIX
35+
36+
/*****************************************************************************/
37+
2338
#define DECLARE_DATA
2439

2540
extern

0 commit comments

Comments
 (0)