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

Side by Side Diff: src/perf-jit.h

Issue 1839133002: Ensure synchronized access to the perf dump file. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes Created 4 years, 8 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
« no previous file with comments | « no previous file | src/perf-jit.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 #elif V8_TARGET_ARCH_ARM 80 #elif V8_TARGET_ARCH_ARM
81 return kElfMachARM; 81 return kElfMachARM;
82 #elif V8_TARGET_ARCH_MIPS 82 #elif V8_TARGET_ARCH_MIPS
83 return kElfMachMIPS; 83 return kElfMachMIPS;
84 #else 84 #else
85 UNIMPLEMENTED(); 85 UNIMPLEMENTED();
86 return 0; 86 return 0;
87 #endif 87 #endif
88 } 88 }
89 89
90 FILE* perf_output_handle_; 90 // Per-process singleton file. We assume that there is one main isolate;
91 uint64_t code_index_; 91 // to determine when it goes away, we keep reference count.
92 void* marker_address_; 92 static base::LazyRecursiveMutex file_mutex_;
93 static FILE* perf_output_handle_;
94 static uint64_t reference_count_;
95 static void* marker_address_;
96 static uint64_t code_index_;
93 }; 97 };
94 98
95 #else 99 #else
96 100
97 // PerfJitLogger is only implemented on Linux 101 // PerfJitLogger is only implemented on Linux
98 class PerfJitLogger : public CodeEventLogger { 102 class PerfJitLogger : public CodeEventLogger {
99 public: 103 public:
100 void CodeMoveEvent(AbstractCode* from, Address to) override { 104 void CodeMoveEvent(AbstractCode* from, Address to) override {
101 UNIMPLEMENTED(); 105 UNIMPLEMENTED();
102 } 106 }
103 107
104 void CodeDisableOptEvent(AbstractCode* code, 108 void CodeDisableOptEvent(AbstractCode* code,
105 SharedFunctionInfo* shared) override { 109 SharedFunctionInfo* shared) override {
106 UNIMPLEMENTED(); 110 UNIMPLEMENTED();
107 } 111 }
108 112
109 void LogRecordedBuffer(AbstractCode* code, SharedFunctionInfo* shared, 113 void LogRecordedBuffer(AbstractCode* code, SharedFunctionInfo* shared,
110 const char* name, int length) override { 114 const char* name, int length) override {
111 UNIMPLEMENTED(); 115 UNIMPLEMENTED();
112 } 116 }
113 }; 117 };
114 118
115 #endif // V8_OS_LINUX 119 #endif // V8_OS_LINUX
116 } // namespace internal 120 } // namespace internal
117 } // namespace v8 121 } // namespace v8
118 #endif 122 #endif
OLDNEW
« no previous file with comments | « no previous file | src/perf-jit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698