Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
spbro
OpenXG-RAN
Commits
31821838
Commit
31821838
authored
Aug 29, 2018
by
Haruki NAOI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: --log-mem options is erased.
parent
d44ef56e
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
310 additions
and
20 deletions
+310
-20
common/utils/LOG/log.c
common/utils/LOG/log.c
+282
-17
common/utils/LOG/log.h
common/utils/LOG/log.h
+14
-0
common/utils/LOG/log_extern.h
common/utils/LOG/log_extern.h
+2
-0
common/utils/itti/assertions.h
common/utils/itti/assertions.h
+0
-1
common/utils/itti/signals.c
common/utils/itti/signals.c
+3
-0
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+8
-2
targets/RT/USER/lte-softmodem.h
targets/RT/USER/lte-softmodem.h
+1
-0
No files found.
common/utils/LOG/log.c
View file @
31821838
This diff is collapsed.
Click to expand it.
common/utils/LOG/log.h
View file @
31821838
...
...
@@ -269,6 +269,20 @@ int is_newline( char *str, int size);
int
register_log_component
(
char
*
name
,
char
*
fext
,
int
compidx
);
#define LOG_MEM_SIZE 500*1024*1024
#define LOG_MEM_FILE "./logmem.log"
void
flush_mem_to_file
(
void
);
void
log_output_memory
(
const
char
*
file
,
const
char
*
func
,
int
line
,
int
comp
,
int
level
,
const
char
*
format
,
va_list
args
);
int
logInit_log_mem
(
void
);
void
close_log_mem
(
void
);
typedef
struct
{
char
*
buf_p
;
int
buf_index
;
int
enable_flag
;
}
log_mem_cnt_t
;
/* @}*/
/*!\fn int32_t write_file_matlab(const char *fname, const char *vname, void *data, int length, int dec, char format);
...
...
common/utils/LOG/log_extern.h
View file @
31821838
...
...
@@ -28,3 +28,5 @@ extern mapping log_level_names[];
extern
mapping
log_options
[];
extern
mapping
log_maskmap
[];
extern
int
log_mem_flag
;
extern
char
*
log_mem_filename
;
common/utils/itti/assertions.h
View file @
31821838
...
...
@@ -35,7 +35,6 @@
#ifndef ASSERTIONS_H_
#define ASSERTIONS_H_
void
output_log_mem
(
void
);
#define _Assert_Exit_ \
{ \
fprintf(stderr, "\nExiting execution\n"); \
...
...
common/utils/itti/signals.c
View file @
31821838
...
...
@@ -117,18 +117,21 @@ int signal_handle(int *end)
case
SIGUSR1
:
SIG_DEBUG
(
"Received SIGUSR1
\n
"
);
*
end
=
1
;
close_log_mem
();
break
;
case
SIGSEGV
:
/* Fall through */
case
SIGABRT
:
SIG_DEBUG
(
"Received SIGABORT
\n
"
);
backtrace_handle_signal
(
&
info
);
close_log_mem
();
break
;
case
SIGINT
:
printf
(
"Received SIGINT
\n
"
);
itti_send_terminate_message
(
TASK_UNKNOWN
);
*
end
=
1
;
close_log_mem
();
break
;
default:
...
...
targets/RT/USER/lte-softmodem.c
View file @
31821838
...
...
@@ -70,6 +70,7 @@
unsigned
short
config_frames
[
4
]
=
{
2
,
9
,
11
,
13
};
#endif
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/log_extern.h"
#include "UTIL/OTG/otg_tx.h"
#include "UTIL/OTG/otg_externs.h"
#include "UTIL/MATH/oml.h"
...
...
@@ -141,7 +142,7 @@ static int8_t threequarter_fs=0;
uint32_t
downlink_frequency
[
MAX_NUM_CCs
][
4
];
int32_t
uplink_frequency_offset
[
MAX_NUM_CCs
][
4
];
char
logmem_filename
[
1024
]
=
{
0
};
// This is a dummy declaration (dlsch_demodulation.c is no longer compiled for eNodeB)
int16_t
dlsch_demod_shift
=
0
;
...
...
@@ -550,7 +551,12 @@ static void get_options(void) {
if
(
start_telnetsrv
)
{
load_module_shlib
(
"telnetsrv"
,
NULL
,
0
);
}
if
(
strlen
(
logmem_filename
)
>
0
)
{
log_mem_filename
=
&
logmem_filename
[
0
];
log_mem_flag
=
1
;
printf
(
"Enabling OPT for log save at memory %s
\n
"
,
log_mem_filename
);
logInit_log_mem
();
}
if
(
!
(
CONFIG_ISFLAGSET
(
CONFIG_ABORT
))
)
{
...
...
targets/RT/USER/lte-softmodem.h
View file @
31821838
...
...
@@ -202,6 +202,7 @@
{"R" , CONFIG_HLP_FLOG, 0, uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \
{"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \
{"log-mem", NULL, 0, strptr:(char **)&logmem_filename, defstrval:"./logmem.log", TYPE_STRING, sizeof(logmem_filename)}, \
}
#define CMDLINE_ONLINELOG_IDX 0
#define CMDLINE_GLOGLEVEL_IDX 1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment