Changeset 241593 in webkit for trunk/Source/JavaScriptCore/tools/CodeProfiling.cpp
- Timestamp:
- Feb 15, 2019, 10:26:16 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/tools/CodeProfiling.cpp
r241559 r241593 29 29 #include "CodeProfile.h" 30 30 #include "MachineContext.h" 31 #include <wtf/Environment.h>32 31 #include <wtf/MetaAllocator.h> 33 32 … … 87 86 { 88 87 // Check for JSC_CODE_PROFILING. 89 auto codeProfilingMode = Environment::getUInt("JSC_CODE_PROFILING");88 const char* codeProfilingMode = getenv("JSC_CODE_PROFILING"); 90 89 if (!codeProfilingMode) 91 90 return; 92 91 93 // Check for a valid mode, currently 1, 2, or 3. 92 // Check for a valid mode, currently "1", "2", or "3". 93 if (!codeProfilingMode[0] || codeProfilingMode[1]) 94 return; 94 95 switch (*codeProfilingMode) { 95 case 1:96 case '1': 96 97 s_mode = Enabled; 97 98 break; 98 case 2:99 case '2': 99 100 s_mode = Verbose; 100 101 break; 101 case 3:102 case '3': 102 103 s_mode = VeryVerbose; 103 104 break;
Note:
See TracChangeset
for help on using the changeset viewer.