Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: src/platform-win32.cc

Issue 6696042: Adding 'isolates' argument to LOG to get rid of multiple TLS fetches in profiling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/isolates
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 } 849 }
850 850
851 LPVOID mbase = VirtualAlloc(reinterpret_cast<void *>(address), 851 LPVOID mbase = VirtualAlloc(reinterpret_cast<void *>(address),
852 msize, 852 msize,
853 MEM_COMMIT | MEM_RESERVE, 853 MEM_COMMIT | MEM_RESERVE,
854 prot); 854 prot);
855 if (mbase == NULL && address != 0) 855 if (mbase == NULL && address != 0)
856 mbase = VirtualAlloc(NULL, msize, MEM_COMMIT | MEM_RESERVE, prot); 856 mbase = VirtualAlloc(NULL, msize, MEM_COMMIT | MEM_RESERVE, prot);
857 857
858 if (mbase == NULL) { 858 if (mbase == NULL) {
859 LOG(StringEvent("OS::Allocate", "VirtualAlloc failed")); 859 LOG(ISOLATE,StringEvent("OS::Allocate", "VirtualAlloc failed"));
860 return NULL; 860 return NULL;
861 } 861 }
862 862
863 ASSERT(IsAligned(reinterpret_cast<size_t>(mbase), OS::AllocateAlignment())); 863 ASSERT(IsAligned(reinterpret_cast<size_t>(mbase), OS::AllocateAlignment()));
864 864
865 *allocated = msize; 865 *allocated = msize;
866 UpdateAllocatedSpaceLimits(mbase, static_cast<int>(msize)); 866 UpdateAllocatedSpaceLimits(mbase, static_cast<int>(msize));
867 return mbase; 867 return mbase;
868 } 868 }
869 869
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 0, // hFile 1192 0, // hFile
1193 reinterpret_cast<PSTR>(module_entry.szExePath), // ImageName 1193 reinterpret_cast<PSTR>(module_entry.szExePath), // ImageName
1194 reinterpret_cast<PSTR>(module_entry.szModule), // ModuleName 1194 reinterpret_cast<PSTR>(module_entry.szModule), // ModuleName
1195 reinterpret_cast<DWORD64>(module_entry.modBaseAddr), // BaseOfDll 1195 reinterpret_cast<DWORD64>(module_entry.modBaseAddr), // BaseOfDll
1196 module_entry.modBaseSize); // SizeOfDll 1196 module_entry.modBaseSize); // SizeOfDll
1197 if (base == 0) { 1197 if (base == 0) {
1198 int err = GetLastError(); 1198 int err = GetLastError();
1199 if (err != ERROR_MOD_NOT_FOUND && 1199 if (err != ERROR_MOD_NOT_FOUND &&
1200 err != ERROR_INVALID_HANDLE) return false; 1200 err != ERROR_INVALID_HANDLE) return false;
1201 } 1201 }
1202 LOG(SharedLibraryEvent( 1202 LOG(i::Isolate::Current(),SharedLibraryEvent(
1203 module_entry.szExePath, 1203 module_entry.szExePath,
1204 reinterpret_cast<unsigned int>(module_entry.modBaseAddr), 1204 reinterpret_cast<unsigned int>(module_entry.modBaseAddr),
1205 reinterpret_cast<unsigned int>(module_entry.modBaseAddr + 1205 reinterpret_cast<unsigned int>(module_entry.modBaseAddr +
1206 module_entry.modBaseSize))); 1206 module_entry.modBaseSize)));
1207 cont = _Module32NextW(snapshot, &module_entry); 1207 cont = _Module32NextW(snapshot, &module_entry);
1208 } 1208 }
1209 CloseHandle(snapshot); 1209 CloseHandle(snapshot);
1210 1210
1211 symbols_loaded = true; 1211 symbols_loaded = true;
1212 return true; 1212 return true;
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
2018 2018
2019 void Sampler::Stop() { 2019 void Sampler::Stop() {
2020 ASSERT(IsActive()); 2020 ASSERT(IsActive());
2021 SamplerThread::RemoveActiveSampler(this); 2021 SamplerThread::RemoveActiveSampler(this);
2022 SetActive(false); 2022 SetActive(false);
2023 } 2023 }
2024 2024
2025 #endif // ENABLE_LOGGING_AND_PROFILING 2025 #endif // ENABLE_LOGGING_AND_PROFILING
2026 2026
2027 } } // namespace v8::internal 2027 } } // namespace v8::internal
OLDNEW
« src/compiler.cc ('K') | « src/platform-solaris.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698