Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace robin_hood map and set with STD alternative and add safeVal() function #696

Merged
merged 8 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ CLANG_WORKS = false
GCC_WORKS = false
MIN_CLANG_VERSION = 16

ifeq ($(DEBUG),true)
override ADDFLAGS += -DBTOP_DEBUG
endif

#? Supported is Clang 16.0.0 and later
ifeq ($(CXX_IS_CLANG),true)
ifeq ($(shell $(CXX) --version | grep Apple >/dev/null 2>&1; echo $$?),0)
Expand Down Expand Up @@ -279,13 +283,13 @@ directories:
clean:
@printf "\033[1;91mRemoving: \033[1;97mbuilt objects...\033[0m\n"
@rm -rf $(BUILDDIR)
@cmake --build lib/rocm_smi_lib/build --target clean &> /dev/null || true
@test -e lib/rocm_smi_lib/build && cmake --build lib/rocm_smi_lib/build --target clean &> /dev/null || true

#? Clean Objects and Binaries
distclean: clean
@printf "\033[1;91mRemoving: \033[1;97mbuilt binaries...\033[0m\n"
@rm -rf $(TARGETDIR)
@rm -rf lib/rocm_smi_lib/build
@test -e lib/rocm_smi_lib/build && rm -rf lib/rocm_smi_lib/build || true

install:
@printf "\033[1;92mInstalling binary to: \033[1;97m$(DESTDIR)$(PREFIX)/bin/btop\n"
Expand Down
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,11 @@ Also needs a UTF8 locale and a font that covers:
### With Make
</summary>

1. **Install dependencies (example for Ubuntu 21.04 Hirsute)**
1. **Install dependencies (example for Ubuntu 21.04 Hirsute)**

```bash
sudo apt install coreutils sed git build-essential gcc-11 g++-11
```
```

2. **Clone repository**

Expand All @@ -391,17 +391,18 @@ Also needs a UTF8 locale and a font that covers:
| `STATIC=true` | For static compilation |
| `QUIET=true` | For less verbose output |
| `STRIP=true` | To force stripping of debug symbols (adds `-s` linker flag) |
| `DEBUG=true` | Sets OPTFLAGS to `-O0 -g` and enables more verbose debug logging |
| `ARCH=<architecture>` | To manually set the target architecture |
| `GPU_SUPPORT=<true\|false>` | Enable/disable GPU support (Enabled by default on X86_64 Linux) |
| `RSMI_STATIC=true` | To statically link the ROCm SMI library used for querying AMDGPU |
| `ADDFLAGS=<flags>` | For appending flags to both compiler and linker |
| `CXX=<compiler>` | Manualy set which compiler to use |
| `CXX=<compiler>` | Manualy set which compiler to use |

Example: `make ADDFLAGS=-march=native` might give a performance boost if compiling only for your own system.

Notice! If using LDAP Authentication, usernames will show as UID number for LDAP users if compiling statically with glibc.

4. **Install**
4. **Install**

```bash
sudo make install
Expand All @@ -411,7 +412,7 @@ Also needs a UTF8 locale and a font that covers:

Notice! Only use "sudo" when installing to a NON user owned directory.

5. **(Optional) Set suid bit to make btop always run as root (or other user)**
5. **(Optional) Set suid bit to make btop always run as root (or other user)**

```bash
sudo make setuid
Expand Down Expand Up @@ -561,13 +562,14 @@ Also needs a UTF8 locale and a font that covers:
| `STATIC=true` | For static compilation (only libgcc and libstdc++) |
| `QUIET=true` | For less verbose output |
| `STRIP=true` | To force stripping of debug symbols (adds `-s` linker flag) |
| `ARCH=<architecture>` | To manually set the target architecture |
| `DEBUG=true` | Sets OPTFLAGS to `-O0 -g` and enables more verbose debug logging |
| `ARCH=<architecture>` | To manually set the target architecture |
| `ADDFLAGS=<flags>` | For appending flags to both compiler and linker |
| `CXX=<compiler>` | Manualy set which compiler to use |
| `CXX=<compiler>` | Manualy set which compiler to use |

Example: `gmake ADDFLAGS=-march=native` might give a performance boost if compiling only for your own system.
Example: `gmake ADDFLAGS=-march=native` might give a performance boost if compiling only for your own system.

4. **Install**
4. **Install**

```bash
sudo gmake install
Expand All @@ -577,7 +579,7 @@ Also needs a UTF8 locale and a font that covers:

Notice! Only use "sudo" when installing to a NON user owned directory.

5. **(Recommended) Set suid bit to make btop always run as root (or other user)**
5. **(Recommended) Set suid bit to make btop always run as root (or other user)**

```bash
sudo gmake setuid
Expand Down Expand Up @@ -726,18 +728,19 @@ Also needs a UTF8 locale and a font that covers:
| `STATIC=true` | For static compilation (only libgcc and libstdc++) |
| `QUIET=true` | For less verbose output |
| `STRIP=true` | To force stripping of debug symbols (adds `-s` linker flag) |
| `ARCH=<architecture>` | To manually set the target architecture |
| `DEBUG=true` | Sets OPTFLAGS to `-O0 -g` and enables more verbose debug logging |
| `ARCH=<architecture>` | To manually set the target architecture |
| `ADDFLAGS=<flags>` | For appending flags to both compiler and linker |
| `CXX=<compiler>` | Manualy set which compiler to use |
| `CXX=<compiler>` | Manualy set which compiler to use |

Example: `gmake ADDFLAGS=-march=native` might give a performance boost if compiling only for your own system.
Example: `gmake ADDFLAGS=-march=native` might give a performance boost if compiling only for your own system.

4. **Install**

```bash
sudo gmake install
```

Append `PREFIX=/target/dir` to set target, default: `/usr/local`

Notice! Only use "sudo" when installing to a NON user owned directory.
Expand All @@ -747,7 +750,7 @@ Also needs a UTF8 locale and a font that covers:
```bash
sudo gmake setuid
```

No need for `sudo` to see information for non user owned processes and to enable signal sending to any process.

Run after make install and use same PREFIX if any was used at install.
Expand Down
Loading
Loading