Commit 2c2d0e50 authored by machenbach's avatar machenbach Committed by Commit bot

Revert of [profiler] fix memory leak for code entries for runtime callstats....

Revert of [profiler] fix memory leak for code entries for runtime callstats. (patchset #1 id:1 of https://codereview.chromium.org/2586923002/ )

Reason for revert:
Looks like the layout tests want these leaks:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/12151

See:
https://github.com/v8/v8/wiki/Blink-layout-tests

Original issue's description:
> [profiler] fix memory leak for code entries for runtime callstats.
>
> Track allocated code entries and delete at the end. This is what we
> do in ProfileListener too.
>
> R=alph@chromium.org, cbruni@chromium.org
> BUG=v8:5753
>
> Review-Url: https://codereview.chromium.org/2586923002
> Cr-Commit-Position: refs/heads/master@{#41793}
> Committed: https://chromium.googlesource.com/v8/v8/+/d0bb789f0358851b6580a274e2b5f2a8f728f44b

TBR=cbruni@chromium.org,alph@chromium.org,yangguo@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5753

Review-Url: https://codereview.chromium.org/2590483002
Cr-Commit-Position: refs/heads/master@{#41806}
parent a680b260
......@@ -649,15 +649,10 @@ ProfileGenerator::ProfileGenerator(Isolate* isolate,
DCHECK(counter->name());
auto entry = new CodeEntry(CodeEventListener::FUNCTION_TAG, counter->name(),
CodeEntry::kEmptyNamePrefix, "native V8Runtime");
code_entries_.push_back(entry);
code_map_.AddCode(reinterpret_cast<Address>(counter), entry, 1);
}
}
ProfileGenerator::~ProfileGenerator() {
for (auto code_entry : code_entries_) delete code_entry;
}
void ProfileGenerator::RecordTickSample(const TickSample& sample) {
std::vector<CodeEntry*> entries;
// Conservatively reserve space for stack frames + pc + function + vm-state.
......
......@@ -369,7 +369,6 @@ class CpuProfilesCollection {
class ProfileGenerator {
public:
ProfileGenerator(Isolate* isolate, CpuProfilesCollection* profiles);
~ProfileGenerator();
void RecordTickSample(const TickSample& sample);
......@@ -382,7 +381,6 @@ class ProfileGenerator {
Isolate* isolate_;
CpuProfilesCollection* profiles_;
CodeMap code_map_;
std::vector<CodeEntry*> code_entries_;
DISALLOW_COPY_AND_ASSIGN(ProfileGenerator);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment