History log of /spdk/app/trace_record/trace_record.c (Results 1 – 11 of 11)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 968224f4 05-Jul-2024 xupeng-mingtu <jingmamour@gmail.com>

app/trace_record: add a optional option '-t'

Use '-t' option to specify the duration of the trace record in seconds,
When the specified time is exceeded, spdk_trace_record will automatically exit

C

app/trace_record: add a optional option '-t'

Use '-t' option to specify the duration of the trace record in seconds,
When the specified time is exceeded, spdk_trace_record will automatically exit

Change-Id: I8319d90790868bd5081107be9cae8d37c9c23343
Signed-off-by: xupeng-mingtu <jingmamour@gmail.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24087
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


Revision tags: v24.05, v24.09-pre, v24.05-rc1
# ae89daab 30-Mar-2024 Jim Harris <jim.harris@samsung.com>

trace: add concept of "owner" to trace files

An "owner" is now represented by a textual string describing the owner of
a trace event.

A trace file can have up to 16K outstanding owners at any given

trace: add concept of "owner" to trace files

An "owner" is now represented by a textual string describing the owner of
a trace event.

A trace file can have up to 16K outstanding owners at any given time. We need
this many to be able to track all of the various NVMe-oF qpairs, bdevs,
NVMe driver qpairs, accel channels, etc. A library creating trace events
can call spdk_trace_register_owner() with a description string to allocate a
a 16-bit owner_id. This owner_id is then passed as a parameter to
spdk_trace_record().

Libraries can change the description of a registered owner by calling
spdk_trace_owner_set_description(). This can be useful for cases like NVMe-oF,
where where a newly established qpair may only have a source IP/port, but later
can be changed to also add the subsystem nqn once the CONNECT command arrives.

A library is responsible for calling spdk_trace_unregister_owner() once the
associated object is destroyed (i.e. a qpair disconnects or a bdev is
unregistered).

An owner lifetime is tracked by recording the tsc when the owner was
registered. This allows the trace app to handle the case where an owner_id
gets reused during the span of a trace file.

Signed-off-by: Jim Harris <jim.harris@samsung.com>
Change-Id: I79c9979a0769c32a85ee646c8237fe8329993c45
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22646
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>

show more ...


# 6da17199 09-Feb-2024 Jim Harris <jim.harris@samsung.com>

trace: add size field to spdk_trace_file

This is more straightforward than using an extra entry in the
lcore_history_offsets array to store the file size. This will also make
more sense if/when we a

trace: add size field to spdk_trace_file

This is more straightforward than using an extra entry in the
lcore_history_offsets array to store the file size. This will also make
more sense if/when we add other types of variable sized data to the trace
files in the future.

The bulk of the changes here are in the trace_record app. We now need to
write out the file_size explicitly to the out_fd.

Signed-off-by: Jim Harris <jim.harris@samsung.com>
Change-Id: I3f22359b23ae5915146142b76e38924568782334
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21791
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>

show more ...


# 23dbcec5 09-Feb-2024 Jim Harris <jim.harris@samsung.com>

trace: merge spdk_trace_flags into spdk_trace_file

Signed-off-by: Jim Harris <jim.harris@samsung.com>
Change-Id: I8a070f986825de2470d5873eaeed3849d36bf1af
Reviewed-on: https://review.spdk.io/gerrit/

trace: merge spdk_trace_flags into spdk_trace_file

Signed-off-by: Jim Harris <jim.harris@samsung.com>
Change-Id: I8a070f986825de2470d5873eaeed3849d36bf1af
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21790
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>

show more ...


# 14e26b9d 12-Feb-2024 Jim Harris <jim.harris@samsung.com>

trace: rename spdk_trace_histories to spdk_trace_file.

The new name is obviously a better fit for what this structure has
become.

Signed-off-by: Jim Harris <jim.harris@samsung.com>
Change-Id: I91e9

trace: rename spdk_trace_histories to spdk_trace_file.

The new name is obviously a better fit for what this structure has
become.

Signed-off-by: Jim Harris <jim.harris@samsung.com>
Change-Id: I91e96bea1d1d507b601e131e222f3181909f35de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21826
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


Revision tags: LTS, v24.01, v24.05-pre, v24.01-rc1, v23.09, v24.01-pre, v23.09-rc1, v23.05, v23.09-pre, v23.01.1, v23.01, v23.05-pre, v23.01-rc1, v22.01.2
# a6dbe372 01-Nov-2022 paul luse <paul.e.luse@intel.com>

update Intel copyright notices

per Intel policy to include file commit date using git cmd
below. The policy does not apply to non-Intel (C) notices.

git log --follow -C90% --format=%ad --date defa

update Intel copyright notices

per Intel policy to include file commit date using git cmd
below. The policy does not apply to non-Intel (C) notices.

git log --follow -C90% --format=%ad --date default <file> | tail -1

and then pull just the 4 digit year from the result.

Intel copyrights were not added to files where Intel either had
no contribution ot the contribution lacked substance (ie license
header updates, formatting changes, etc). Contribution date used
"--follow -C95%" to get the most accurate date.

Note that several files in this patch didn't end the license/(c)
block with a blank comment line so these were added as the vast
majority of files do have this last blank line. Simply there for
consistency.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id5b7ce4f658fe87132f14139ead58d6e285c04d4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15192
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot

show more ...


Revision tags: v22.09, v23.01-pre, v22.09-rc1
# 18c8b52a 12-Aug-2022 Jim Harris <james.r.harris@intel.com>

trace: allocate shm filesize based on number of cores used

Previously we would always allocate the shm file based on
max (128) cores which is unnecessary. So use
spdk_env APIs to only allocate shm

trace: allocate shm filesize based on number of cores used

Previously we would always allocate the shm file based on
max (128) cores which is unnecessary. So use
spdk_env APIs to only allocate shm file size based
on the cores we might possible use.

With default settings, an shm file was 135MB before this
change, now an app using cores 0-7 will just use
about 9MB.

A lot of the trace-related code depended on there
*always* being a history for every core, even unused
ones, so a few additional changes were needed,
mainly the trace_parser library.

Tested by starting an app using a 0x4 core mask and
enabling a trace mask, generating some events, then
checking both the size of the shm file and that
spdk_trace works properly with the resulting file.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie868b3e3658d6f82b2fea37cb87453e8a9e0abc4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14044
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>

show more ...


# 8dd1cd21 22-Jun-2022 Ben Walker <benjamin.walker@intel.com>

check_format: For C files only, fix return type breaks

In SPDK, declarations have the return type on the same line. Definitions
have the return type on a separate line. Astyle has an option for
enfo

check_format: For C files only, fix return type breaks

In SPDK, declarations have the return type on the same line. Definitions
have the return type on a separate line. Astyle has an option for
enforcing this. Unfortunately, it seems to have two bugs:

1) It doesn't work correctly at all on C++ files.
2) It often fails on functions that return enums, or long type names

Deal with 1) by adjusting the check_format.sh script to only tell astyle
to fix return type line breaks for C files and not C++. Deal with 2) by
adding a few typedefs to work around the problem.

Change-Id: Idf28281466cab8411ce252d5f02ab384166790c6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13437
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>

show more ...


# 488570eb 03-Jun-2022 Jim Harris <james.r.harris@intel.com>

Replace most BSD 3-clause license text with SPDX identifier.

Many open source projects have moved to using SPDX identifiers
to specify license information, reducing the amount of
boilerplate code in

Replace most BSD 3-clause license text with SPDX identifier.

Many open source projects have moved to using SPDX identifiers
to specify license information, reducing the amount of
boilerplate code in every source file. This patch replaces
the bulk of SPDK .c, .cpp and Makefiles with the BSD-3-Clause
identifier.

Almost all of these files share the exact same license text,
and this patch only modifies the files that contain the
most common license text. There can be slight variations
because the third clause contains company names - most say
"Intel Corporation", but there are instances for Nvidia,
Samsung, Eideticom and even "the copyright holder".

Used a bash script to automate replacement of the license text
with SPDX identifier which is checked into scripts/spdx.sh.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaa88ab5e92ea471691dc298cfe41ebfb5d169780
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12904
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: <qun.wan@intel.com>

show more ...


Revision tags: v22.05, v22.09-pre, v22.05-rc1, v22.01.1, v22.01, v22.01-rc1, v21.10, v21.10-rc1, v21.07, v21.07-rc1, v21.04, v21.04-rc1, v21.01.1, v21.01, v21.01-rc1
# 097d1979 25-Jan-2021 wanghailiangx <hailiangx.e.wang@intel.com>

app/trace_record: modify help case to return 0

Case 'h' or 'H' should return 0, this is a normal return.

Change-Id: I872cdeeaab8bbe0efac8a8f959c1bd88f159b0b8
Signed-off-by: wanghailiangx <hailiangx

app/trace_record: modify help case to return 0

Case 'h' or 'H' should return 0, this is a normal return.

Change-Id: I872cdeeaab8bbe0efac8a8f959c1bd88f159b0b8
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6064
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>

show more ...


Revision tags: v20.10, v20.10-rc1, v20.07, v20.07-rc1, v20.04.1, v20.01.2, v20.04, v20.04-rc1, v20.01.1, v20.01, v20.01-rc1, v19.10.1, v19.10, v19.10-rc1, v19.07.1, v19.07, v19.04.1, v19.04, v18.10.2, v19.01.1, v19.01, v18.10.1
# a206234d 15-Nov-2018 Liu Xiaodong <xiaodong.liu@intel.com>

lib/trace: add trace_record tool

trace_record is used to poll the spdk trace shm file
and store new entries from it to another specified trace file.
This could help retain the trace_entires from the

lib/trace: add trace_record tool

trace_record is used to poll the spdk trace shm file
and store new entries from it to another specified trace file.
This could help retain the trace_entires from the overlay of
trace circular buffer

Note:
* trace_record reads the input tracefile into a process-local
memory and writes trace entries to the output file only at shutdown.
* trace_record can be shut down on SIGINT or SIGTERM signal.

A usage sample is:
./spdk_trace_record -s bdev_svc -p <spdk app pid> -f trace.tmp -q

Change-Id: If073a05022ec9c1b45923c38ba407a873be8741b
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/433385
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>

show more ...