1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 03:41:55 +00:00
srs/trunk/3rdparty/st-srs
2021-12-30 11:28:10 +08:00
..
docs For #1537, #1282, use ST source code in SRS 2019-12-25 15:55:56 +08:00
examples For #1537, #1282, use ST source code in SRS 2019-12-25 15:55:56 +08:00
extensions For #1537, #1282, use ST source code in SRS 2019-12-25 15:55:56 +08:00
.gitignore Test: Update srs-bench 2021-03-23 12:12:01 +08:00
common.h Clock: Update stat. Insert timer to execute first 2021-02-19 18:53:02 +08:00
event.c Support to disable stats by default 2021-02-19 18:53:34 +08:00
io.c For #2188: Remove sendmmsg from ST. 2021-03-02 19:31:33 +08:00
key.c For #1537, #1282, use ST source code in SRS 2019-12-25 15:55:56 +08:00
libst.def For #1537, #1282, use ST source code in SRS 2019-12-25 15:55:56 +08:00
Makefile For #2188: Remove sendmmsg from ST. 2021-03-02 19:31:33 +08:00
md.h Support macOS OSX 2020-03-28 17:20:40 +08:00
md.S For #1537, #1282, use new algorithm for arm. 2019-12-25 20:11:31 +08:00
md_darwin.S ST: Refine OSX asm. 2021-07-29 08:46:38 +08:00
osguess.sh For #1537, #1282, use ST source code in SRS 2019-12-25 15:55:56 +08:00
public.h For #2188: Remove sendmmsg from ST. 2021-03-02 19:31:33 +08:00
README For #1537, #1282, use ST source code in SRS 2019-12-25 15:55:56 +08:00
README.md Change images from gitee to ossrs.net 2021-12-30 11:28:10 +08:00
sched.c Support to disable stats by default 2021-02-19 18:53:34 +08:00
st.pc.in For #1537, #1282, use ST source code in SRS 2019-12-25 15:55:56 +08:00
st.spec For #1537, #1282, use ST source code in SRS 2019-12-25 15:55:56 +08:00
stk.c For #1537, #1282, use ST source code in SRS 2019-12-25 15:55:56 +08:00
sync.c For #1537, #1282, use ST source code in SRS 2019-12-25 15:55:56 +08:00

state-threads

Fork from http://sourceforge.net/projects/state-threads, patched for SRS.

See: https://github.com/ossrs/state-threads/blob/srs/README

For original ST without any changes, checkout the ST master branch.

Usage

Get code:

git clone https://github.com/ossrs/state-threads.git st-1.9 &&
git checkout -b srs origin/srs

For Linux:

make linux-debug EXTRA_CFLAGS="-DMD_HAVE_EPOLL"

For OSX:

make darwin-debug EXTRA_CFLAGS="-DMD_HAVE_KQUEUE"

Linux with valgrind:

make linux-debug EXTRA_CFLAGS="-DMD_VALGRIND"

Remark: User must install valgrind, for instance, in centos6 sudo yum install -y valgrind valgrind-devel.

Linux with valgrind and epoll:

make linux-debug EXTRA_CFLAGS="-DMD_HAVE_EPOLL -DMD_VALGRIND"

For OSX, user must specifies the valgrind header files:

make darwin-debug EXTRA_CFLAGS="-DMD_HAVE_KQUEUE -DMD_VALGRIND -I/usr/local/include"

Remark: Latest OSX does not support ST, please use docker to run ST.

Branch SRS

The branch srs will be patched the following patches:

GDB Tools

Valgrind

How to debug with gdb under valgrind, read valgrind manual.

About startup parameters, read valgrind cli.

Important cli options:

  1. --undef-value-errors=<yes|no> [default: yes], Controls whether Memcheck reports uses of undefined value errors. Set this to no if you don't want to see undefined value errors. It also has the side effect of speeding up Memcheck somewhat.
  2. --leak-check=<no|summary|yes|full> [default: summary], When enabled, search for memory leaks when the client program finishes. If set to summary, it says how many leaks occurred. If set to full or yes, each individual leak will be shown in detail and/or counted as an error, as specified by the options --show-leak-kinds and --errors-for-leak-kinds.
  3. --track-origins=<yes|no> [default: no], Controls whether Memcheck tracks the origin of uninitialised values. By default, it does not, which means that although it can tell you that an uninitialised value is being used in a dangerous way, it cannot tell you where the uninitialised value came from. This often makes it difficult to track down the root problem.
  4. --show-reachable=<yes|no> , --show-possibly-lost=<yes|no>, to show the using memory.

Docs & Analysis

Winlin 2016