aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuliano Procida <gprocida@google.com>2023-11-16 07:21:56 +0000
committerGiuliano Procida <gprocida@google.com>2023-11-20 12:58:41 +0000
commite464e3e1f310d835b9ba6f29d758fdbe8d2ec7e2 (patch)
tree4ff3ae4f18617960e8ec5fb5a5d86b32466c3e92
parent7a2d42e285afa5ebde6927929d70bf194f6c9eac (diff)
downloadstg-e464e3e1f310d835b9ba6f29d758fdbe8d2ec7e2.tar.gz
remove stg --info option
This no longer did anything useful. PiperOrigin-RevId: 582923427 Change-Id: Ic0d460eaeda186abe85a79bc74cf5276fc1cb264
-rw-r--r--doc/stg.md11
-rw-r--r--reader_options.h5
-rw-r--r--stg.cc7
3 files changed, 3 insertions, 20 deletions
diff --git a/doc/stg.md b/doc/stg.md
index 0fc8af8..30c738b 100644
--- a/doc/stg.md
+++ b/doc/stg.md
@@ -8,7 +8,6 @@ BTF and ELF/DWARF.
```
stg
[-m|--metrics]
- [-i|--info]
[-d|--keep-duplicates]
[-t|--types]
[-F|--files|--file-filter <filter>]
@@ -163,13 +162,3 @@ nodes that are recursively equal. By default, duplicate nodes are eliminated.
* `-m|--metrics`
Print various internal timing and other metrics.
-
-* `-i|--info` - **deprecated**
-
- This causes the BTF and ELF parsers to dump information to stdout about the
- entities processed. This is primarily useful for debugging. In the case of
- BTF input, the output is intended to match the output of `bpftool btf dump
- file "$file" format raw`.
-
- This option will be removed as there is no use-case beyond the initial
- debugging of STG's parsers.
diff --git a/reader_options.h b/reader_options.h
index 8b6736a..56388d2 100644
--- a/reader_options.h
+++ b/reader_options.h
@@ -26,9 +26,8 @@ namespace stg {
struct ReadOptions {
enum Value {
- INFO = 1 << 0,
- SKIP_DWARF = 1 << 1,
- TYPE_ROOTS = 1 << 2,
+ SKIP_DWARF = 1 << 0,
+ TYPE_ROOTS = 1 << 1,
};
using Bitset = std::underlying_type_t<Value>;
diff --git a/stg.cc b/stg.cc
index b0d2eeb..fac1717 100644
--- a/stg.cc
+++ b/stg.cc
@@ -130,7 +130,6 @@ int main(int argc, char* argv[]) {
std::vector<const char*> outputs;
static option opts[] = {
{"metrics", no_argument, nullptr, 'm' },
- {"info", no_argument, nullptr, 'i' },
{"keep-duplicates", no_argument, nullptr, 'd' },
{"types", no_argument, nullptr, 't' },
{"files", required_argument, nullptr, 'F' },
@@ -148,7 +147,6 @@ int main(int argc, char* argv[]) {
auto usage = [&]() {
std::cerr << "usage: " << argv[0] << '\n'
<< " [-m|--metrics]\n"
- << " [-i|--info]\n"
<< " [-d|--keep-duplicates]\n"
<< " [-t|--types]\n"
<< " [-F|--files|--file-filter <filter>]\n"
@@ -162,7 +160,7 @@ int main(int argc, char* argv[]) {
};
while (true) {
int ix;
- const int c = getopt_long(argc, argv, "-midtS:F:abeso:", opts, &ix);
+ const int c = getopt_long(argc, argv, "-mdtS:F:abeso:", opts, &ix);
if (c == -1) {
break;
}
@@ -171,9 +169,6 @@ int main(int argc, char* argv[]) {
case 'm':
opt_metrics = true;
break;
- case 'i':
- opt_read_options.Set(stg::ReadOptions::INFO);
- break;
case 'd':
opt_keep_duplicates = true;
break;