Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MojitOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sepia-pub
MojitOS
Commits
a9496a7f
Commit
a9496a7f
authored
2 years ago
by
floreal.risso
Browse files
Options
Downloads
Patches
Plain Diff
update: add in autoconf
parent
f1348876
No related branches found
No related tags found
2 merge requests
!9
fix sensor example (doc)
,
!7
Add memory counters and fix makefile
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitignore
+1
-1
1 addition, 1 deletion
.gitignore
configure.sh
+1
-0
1 addition, 0 deletions
configure.sh
makefile
+5
-1
5 additions, 1 deletion
makefile
src/memory_counters.h
+1
-1
1 addition, 1 deletion
src/memory_counters.h
src/memory_option.sh
+0
-0
0 additions, 0 deletions
src/memory_option.sh
with
8 additions
and
3 deletions
.gitignore
+
1
−
1
View file @
a9496a7f
...
...
@@ -6,7 +6,7 @@ doc/info_reader_ex
doc/mojitos.1
tests/run
src/counters_option.h
src/mem
info
_option.h
src/mem
ory
_option.h
src/sensors.h
sensors.mk
bin
...
...
This diff is collapsed.
Click to expand it.
configure.sh
+
1
−
0
View file @
a9496a7f
...
...
@@ -117,6 +117,7 @@ detect_caps() {
[
-r
/usr/include/linux/perf_event.h
]
&&
hdr_whitelist
=
counters
[
-d
/sys/class/infiniband
]
&&
hdr_whitelist
=
"
${
hdr_whitelist
}
|infiniband"
[
-r
/proc/stat
]
&&
hdr_whitelist
=
"
${
hdr_whitelist
}
|load"
[
-r
/proc/meminfo
]
&&
hdr_whitelist
=
"
${
hdr_whitelist
}
|memory_counters"
if
[
"
$(
uname
-r
|
cut
-d
"."
-f
1
)
"
-gt
"2"
]
;
then
hdr_whitelist
=
"
${
hdr_whitelist
}
|memory"
...
...
This diff is collapsed.
Click to expand it.
makefile
+
5
−
1
View file @
a9496a7f
...
...
@@ -40,8 +40,9 @@ $(BIN): $(BIN_DIR) $(OBJ) $(OBJ_DIR)/$(BIN).o
$(OBJ)
:
$(OBJ_DIR)
$(OBJ_DIR)/counters.o
:
$(SRC_DIR)/counters_option.h
$(OBJ_DIR)/memory_counters.o
:
$(SRC_DIR)/memory_option.h
$(OBJ_DIR)/$(BIN).o
:
$(SRC_DIR)/$(BIN).c $(SRC_DIR)/counters_option.h
$(OBJ_DIR)/$(BIN).o
:
$(SRC_DIR)/$(BIN).c $(SRC_DIR)/counters_option.h
$(SRC_DIR)/memory_counters.h
$(
CC
)
$(
CFLAGS
)
-c
$<
-o
$@
$(OBJ_DIR)/util.o
:
$(SRC_DIR)/util.c $(SRC_DIR)/util.h
...
...
@@ -50,6 +51,9 @@ $(OBJ_DIR)/util.o: $(SRC_DIR)/util.c $(SRC_DIR)/util.h
$(SRC_DIR)/counters_option.h
:
$(SRC_DIR)/counters_option.sh
sh ./
$(
SRC_DIR
)
/counters_option.sh
>
$(
SRC_DIR
)
/counters_option.h
$(SRC_DIR)/memory_option.h
:
$(SRC_DIR)/memory_option.sh
sh ./
$(
SRC_DIR
)
/memory_option.sh
>
$(
SRC_DIR
)
/memory_option.h
$(OBJ_DIR)
:
mkdir
-p
$(
OBJ_DIR
)
...
...
This diff is collapsed.
Click to expand it.
src/memory_counters.h
+
1
−
1
View file @
a9496a7f
...
...
@@ -24,7 +24,7 @@ void label_memory_counters(char **labels, void *ptr);
void
clean_memory_counters
(
void
*
ptr
);
void
*
show_all_memory_counters
(
void
*
,
size_t
);
s
ensor
memory_counters
=
{
S
ensor
memory_counters
=
{
.
init
=
init_memory_counters
,
.
get
=
get_memory_counters
,
.
clean
=
clean_memory_counters
,
...
...
This diff is collapsed.
Click to expand it.
src/mem
info
_option.sh
→
src/mem
ory
_option.sh
100644 → 100755
+
0
−
0
View file @
a9496a7f
File moved
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment