Commit f8eeb36a authored by Ella Ge's avatar Ella Ge Committed by Commit Bot

Revert "Reland: SuperSize: 3x speedup by minimizing string allocations"

This reverts commit 516cf22e.

Reason for revert: compile failure on windows
https://ci.chromium.org/p/chromium/builders/ci/win32-archive-rel/6356

Original change's description:
> Reland: SuperSize: 3x speedup by minimizing string allocations
> 
> Use runtime endianness check to avoid system-dependent header files.
> 
> Bug: 1011921
> Change-Id: I1870db11d986eb8a805c5105ed67750cb8ce2c96
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1873395
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Commit-Queue: Jasper Chapman-Black <jaspercb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#708269}

TBR=agrieve@chromium.org,jaspercb@chromium.org

Change-Id: I98b4abcfdfff28bbad60b11c4cd406b4ff89c6ee
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011921
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1873722Reviewed-by: default avatarElla Ge <eirage@chromium.org>
Commit-Queue: Ella Ge <eirage@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708275}
parent 958401ce
...@@ -23,10 +23,8 @@ python_library("sizes_py") { ...@@ -23,10 +23,8 @@ python_library("sizes_py") {
] ]
} }
if (!is_mac) { group("caspian") {
group("caspian") { deps = [
deps = [ "//tools/binary_size/libsupersize/caspian:cli($host_toolchain)",
"//tools/binary_size/libsupersize/caspian:cli($host_toolchain)", ]
]
}
} }
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <deque> #include <deque>
#include <string>
#include <vector> #include <vector>
#include "third_party/jsoncpp/source/include/json/json.h" #include "third_party/jsoncpp/source/include/json/json.h"
...@@ -24,11 +25,13 @@ struct Symbol { ...@@ -24,11 +25,13 @@ struct Symbol {
int32_t size = 0; int32_t size = 0;
int32_t flags = 0; int32_t flags = 0;
int32_t padding = 0; int32_t padding = 0;
const char* full_name = nullptr; std::string full_name;
const char* section_name = nullptr; std::string template_name;
const char* object_path = nullptr; std::string name;
const char* source_path = nullptr; const std::string* object_path = nullptr;
const char* component = nullptr; const std::string* section_name = nullptr;
const std::string* source_path = nullptr;
const std::string* component = nullptr;
std::vector<Symbol*>* aliases = nullptr; std::vector<Symbol*>* aliases = nullptr;
}; };
...@@ -42,11 +45,11 @@ struct SizeInfo { ...@@ -42,11 +45,11 @@ struct SizeInfo {
Json::Value metadata; Json::Value metadata;
// Entries in |raw_symbols| hold pointers to this data. // Entries in |raw_symbols| hold pointers to this data.
std::vector<const char*> object_paths; // Appending to one will change their capacity and invalidate pointers.
std::vector<const char*> source_paths; std::vector<std::string> object_paths;
std::vector<const char*> components; std::vector<std::string> source_paths;
std::vector<const char*> section_names; std::vector<std::string> components;
std::vector<char> raw_decompressed; std::vector<std::string> section_names;
// A container for each symbol group. // A container for each symbol group.
std::deque<std::vector<Symbol*>> alias_groups; std::deque<std::vector<Symbol*>> alias_groups;
......
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