Conflicts: Documentation/ABI/testing/sysfs-block-zram Documentation/ABI/testing/sysfs-class-power Documentation/blockdev/zram.txt Documentation/devicetree/bindings/arm/coresight.txt Documentation/devicetree/bindings/i2c/qcom,i2c-qcom-geni.txt Makefile arch/arm/Makefile arch/arm/configs/vendor/sa515m-perf_defconfig arch/arm/configs/vendor/sa515m_defconfig arch/arm/configs/vendor/sdxprairie-perf_defconfig arch/arm/configs/vendor/sdxprairie_defconfig arch/arm/kernel/smp.c arch/arm64/boot/dts/qcom/Makefile arch/arm64/boot/dts/qcom/atoll-idp.dtsi arch/arm64/boot/dts/qcom/atoll-sde-display.dtsi arch/arm64/boot/dts/qcom/sa515m-flashless.dtsi arch/arm64/boot/dts/qcom/sa8155-adp-star-display.dtsi arch/arm64/boot/dts/qcom/sdxprairie-cdp.dtsi arch/arm64/boot/dts/qcom/sdxprairie-mtp-le-cpe.dtsi arch/arm64/boot/dts/qcom/sdxprairie-v2-mtp-le-cpe.dtsi arch/arm64/boot/dts/qcom/sdxprairie.dtsi arch/arm64/boot/dts/qcom/sm8150-sdxprairie.dtsi arch/arm64/boot/dts/qcom/sm8150.dtsi arch/arm64/configs/cuttlefish_defconfig arch/arm64/include/asm/alternative.h arch/arm64/include/asm/cpucaps.h arch/arm64/include/asm/pgtable.h arch/arm64/include/asm/processor.h arch/arm64/include/asm/ptrace.h arch/arm64/include/asm/sysreg.h arch/arm64/kernel/cpu_errata.c arch/arm64/kernel/cpufeature.c arch/arm64/kernel/smp.c arch/arm64/kernel/vdso/Makefile arch/arm64/kernel/vmlinux.lds.S arch/arm64/mm/init.c arch/x86/configs/x86_64_cuttlefish_defconfig arch/x86/kernel/vmlinux.lds.S block/bio.c block/blk-core.c block/blk-merge.c build.config.common build.config.cuttlefish.aarch64 build.config.cuttlefish.x86_64 drivers/Makefile drivers/android/binder.c drivers/base/power/main.c drivers/base/power/wakeup.c drivers/block/virtio_blk.c drivers/block/zram/zram_drv.c drivers/block/zram/zram_drv.h drivers/bus/mhi/core/mhi_init.c drivers/bus/mhi/core/mhi_internal.h drivers/bus/mhi/core/mhi_main.c drivers/bus/mhi/core/mhi_pm.c drivers/char/adsprpc.c drivers/char/diag/diagchar.h drivers/clk/clk.c drivers/clk/qcom/mdss/mdss-dsi-pll-7nm.c drivers/cpufreq/cpufreq_stats.c drivers/crypto/msm/qce50.c drivers/dma-buf/dma-buf.c drivers/gpu/drm/msm/dsi-staging/dsi_defs.h drivers/gpu/drm/msm/dsi-staging/dsi_display.c drivers/gpu/drm/msm/dsi-staging/dsi_drm.c drivers/gpu/drm/msm/dsi-staging/dsi_panel.c drivers/gpu/drm/msm/dsi-staging/dsi_panel.h drivers/gpu/drm/msm/msm_gem.c drivers/gpu/drm/msm/msm_kms.h drivers/gpu/drm/msm/sde/sde_connector.c drivers/gpu/drm/msm/sde/sde_encoder.c drivers/gpu/msm/adreno_a5xx.h drivers/gpu/msm/adreno_a5xx_preempt.c drivers/gpu/msm/adreno_a6xx_gmu.c drivers/gpu/msm/adreno_ringbuffer.c drivers/gpu/msm/kgsl.c drivers/gpu/msm/kgsl.h drivers/gpu/msm/kgsl_debugfs.c drivers/gpu/msm/kgsl_device.h drivers/gpu/msm/kgsl_mmu.c drivers/gpu/msm/kgsl_pool.c drivers/gpu/msm/kgsl_trace.h drivers/hid/hid-qvr.c drivers/hwtracing/coresight/Makefile drivers/hwtracing/coresight/coresight-byte-cntr.c drivers/hwtracing/coresight/coresight-etm-perf.c drivers/hwtracing/coresight/coresight-etm4x.c drivers/hwtracing/coresight/coresight-funnel.c drivers/hwtracing/coresight/coresight-tmc-etf.c drivers/hwtracing/coresight/coresight-tmc-etr.c drivers/hwtracing/coresight/coresight-tmc.c drivers/hwtracing/coresight/coresight-tmc.h drivers/hwtracing/coresight/coresight.c drivers/hwtracing/coresight/of_coresight.c drivers/i2c/busses/i2c-qcom-geni.c drivers/input/misc/qpnp-power-on.c drivers/irqchip/irq-gic-v3.c drivers/md/Kconfig drivers/md/dm-default-key.c drivers/media/platform/msm/ais/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c drivers/media/platform/msm/ais/cam_sensor_module/cam_cci/cam_cci_core.c drivers/media/platform/msm/ais/cam_sensor_module/cam_sensor_io/cam_sensor_cci_i2c.c drivers/media/platform/msm/camera/cam_core/cam_hw_mgr_intf.h drivers/media/platform/msm/camera/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c drivers/media/platform/msm/camera/cam_isp/cam_isp_context.c drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c drivers/media/platform/msm/camera/cam_lrme/lrme_hw_mgr/cam_lrme_hw_mgr.c drivers/media/platform/msm/camera/cam_req_mgr/cam_req_mgr_core.c drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/cam_cci_dev.h drivers/media/platform/msm/camera/cam_sensor_module/cam_csiphy/include/cam_csiphy_1_2_2_hwreg.h drivers/media/platform/msm/camera/cam_smmu/cam_smmu_api.c drivers/media/platform/msm/npu_v2/npu_mgr.c drivers/mmc/core/quirks.h drivers/mmc/core/sdio_irq.c drivers/mmc/host/sdhci-msm.c drivers/mtd/devices/msm_qpic_nand.c drivers/net/ethernet/aquantia/atlantic-fwd/atl_common.h drivers/net/ethernet/aquantia/atlantic-fwd/atl_ethtool.c drivers/net/ethernet/aquantia/atlantic-fwd/atl_fw.c drivers/net/ethernet/aquantia/atlantic-fwd/atl_fw.h drivers/net/ethernet/aquantia/atlantic-fwd/atl_hw.c drivers/net/ethernet/aquantia/atlantic-fwd/atl_hw.h drivers/net/ethernet/aquantia/atlantic-fwd/atl_macsec.c drivers/net/ethernet/aquantia/atlantic-fwd/atl_main.c drivers/net/ethernet/aquantia/atlantic-fwd/macsec/macsec_api.c drivers/net/ethernet/aquantia/atlantic-fwd/macsec/macsec_api.h drivers/net/ethernet/aquantia/atlantic-fwd/release_notes.txt drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.h drivers/net/ethernet/stmicro/stmmac/stmmac.h drivers/net/ethernet/stmicro/stmmac/stmmac_main.c drivers/net/macsec.c drivers/platform/msm/ipa/ipa_api.h drivers/platform/msm/ipa/ipa_v3/ethernet/ipa_eth.c drivers/platform/msm/ipa/ipa_v3/ethernet/ipa_eth_i.h drivers/platform/msm/ipa/ipa_v3/ethernet/ipa_eth_net.c drivers/platform/msm/ipa/ipa_v3/ipa_debugfs.c drivers/platform/msm/ipa/ipa_v3/ipa_i.h drivers/platform/msm/ipa/ipa_v3/ipa_nat.c drivers/platform/msm/ipa/ipa_v3/ipa_qmi_service.c drivers/platform/msm/ipa/ipa_v3/ipa_utils.c drivers/platform/msm/ipa/ipa_v3/rmnet_ipa_fd_ioctl.c drivers/platform/msm/qcom-geni-se.c drivers/power/supply/qcom/battery.c drivers/power/supply/qcom/qpnp-smb5.c drivers/power/supply/qcom/smb1398-charger.c drivers/power/supply/qcom/smb5-lib.c drivers/regulator/qpnp-amoled-regulator.c drivers/rpmsg/qcom_glink_native.c drivers/rpmsg/qcom_glink_smem.c drivers/scsi/ufs/Kconfig drivers/scsi/ufs/Makefile drivers/scsi/ufs/ufs-qcom.c drivers/scsi/ufs/ufshcd.c drivers/scsi/ufs/ufshcd.h drivers/soc/qcom/Kconfig drivers/soc/qcom/Makefile drivers/soc/qcom/peripheral-loader.c drivers/soc/qcom/sdx_ext_ipc.c drivers/soc/qcom/socinfo.c drivers/spi/spi-geni-qcom.c drivers/staging/android/ion/ion.c drivers/staging/android/ion/ion.h drivers/staging/android/ion/ion_page_pool.c drivers/tty/Kconfig drivers/tty/serial/msm_geni_serial.c drivers/usb/dwc3/ep0.c drivers/usb/dwc3/gadget.c fs/crypto/Makefile fs/crypto/bio.c fs/crypto/fname.c fs/crypto/fscrypt_ice.c fs/crypto/fscrypt_ice.h fs/crypto/fscrypt_private.h fs/crypto/keyring.c fs/crypto/keysetup.c fs/crypto/keysetup_v1.c fs/direct-io.c fs/ext4/Kconfig fs/ext4/inode.c fs/ext4/ioctl.c fs/ext4/move_extent.c fs/ext4/namei.c fs/ext4/page-io.c fs/ext4/readpage.c fs/ext4/super.c fs/f2fs/checkpoint.c fs/f2fs/compress.c fs/f2fs/data.c fs/f2fs/dir.c fs/f2fs/f2fs.h fs/f2fs/gc.c fs/f2fs/inode.c fs/f2fs/namei.c fs/f2fs/node.c fs/f2fs/segment.c fs/f2fs/super.c fs/incfs/Kconfig fs/incfs/Makefile fs/incfs/data_mgmt.c fs/incfs/data_mgmt.h fs/incfs/format.c fs/incfs/format.h fs/incfs/internal.h fs/incfs/main.c fs/incfs/vfs.c fs/incfs/vfs.h fs/libfs.c fs/sdcardfs/lookup.c fs/ubifs/dir.c fs/unicode/utf8-core.c fs/userfaultfd.c include/asm-generic/vmlinux.lds.h include/linux/bio.h include/linux/blk_types.h include/linux/coresight.h include/linux/dma-buf.h include/linux/fs.h include/linux/fscrypt.h include/linux/kasan.h include/linux/mmzone.h include/linux/msm_gsi.h include/linux/overflow.h include/linux/pfk.h include/linux/sched.h include/linux/wakeup_reason.h include/net/ndisc.h include/soc/qcom/socinfo.h include/uapi/linux/fscrypt.h include/uapi/linux/incrementalfs.h include/uapi/linux/input-event-codes.h include/uapi/linux/msm_ipa.h include/uapi/linux/taskstats.h include/uapi/media/cam_req_mgr.h kernel/cpu.c kernel/events/core.c kernel/irq/chip.c kernel/power/wakeup_reason.c kernel/sched/core.c kernel/sched/core_ctl.c kernel/sched/cpufreq_schedutil.c kernel/sched/deadline.c kernel/sched/fair.c kernel/sched/rt.c kernel/sched/sched.h kernel/sched/stop_task.c kernel/sched/walt.h kernel/taskstats.c kernel/time/hrtimer.c lib/Makefile lib/test_kasan.c lib/test_stackinit.c mm/Kconfig mm/filemap.c mm/kasan/report.c mm/memblock.c mm/memory.c mm/vmscan.c mm/vmstat.c net/core/skbuff.c net/ipv4/ip_output.c net/ipv4/syncookies.c net/ipv4/sysctl_net_ipv4.c net/ipv6/syncookies.c net/qrtr/qrtr.c scripts/Makefile.lib security/pfe/Kconfig security/pfe/Makefile security/pfe/pfk.c security/pfe/pfk_ext4.c security/pfe/pfk_ext4.h security/pfe/pfk_f2fs.c security/pfe/pfk_f2fs.h security/pfe/pfk_ice.c security/pfe/pfk_ice.h security/pfe/pfk_kc.c security/pfe/pfk_kc.h security/selinux/avc.c security/selinux/hooks.c security/selinux/include/security.h sound/core/compress_offload.c sound/soc/codecs/Kconfig sound/soc/codecs/Makefile techpack/.gitignore techpack/Kbuild techpack/stub/Makefile techpack/stub/include/uapi/Kbuild techpack/stub/stub.c tools/testing/selftests/filesystems/incfs/.gitignore tools/testing/selftests/filesystems/incfs/Makefile tools/testing/selftests/filesystems/incfs/incfs_test.c tools/testing/selftests/filesystems/incfs/utils.c tools/testing/selftests/filesystems/incfs/utils.h Bug: 182255618 Change-Id: Ibdfb2b8523b6c40a8e12bf1878eb54ef4b0adb04 Signed-off-by: JohnnLee <johnnlee@google.com>
218 lines
7.0 KiB
C
218 lines
7.0 KiB
C
/* SPDX-License-Identifier: LGPL-2.1 WITH Linux-syscall-note */
|
|
/* taskstats.h - exporting per-task statistics
|
|
*
|
|
* Copyright (C) Shailabh Nagar, IBM Corp. 2006
|
|
* (C) Balbir Singh, IBM Corp. 2006
|
|
* (C) Jay Lan, SGI, 2006
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of version 2.1 of the GNU Lesser General Public License
|
|
* as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it would be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
*/
|
|
|
|
#ifndef _LINUX_TASKSTATS_H
|
|
#define _LINUX_TASKSTATS_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
/* Format for per-task data returned to userland when
|
|
* - a task exits
|
|
* - listener requests stats for a task
|
|
*
|
|
* The struct is versioned. Newer versions should only add fields to
|
|
* the bottom of the struct to maintain backward compatibility.
|
|
*
|
|
*
|
|
* To add new fields
|
|
* a) bump up TASKSTATS_VERSION
|
|
* b) add comment indicating new version number at end of struct
|
|
* c) add new fields after version comment; maintain 64-bit alignment
|
|
*/
|
|
|
|
|
|
#define TASKSTATS_VERSION 9
|
|
#define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN
|
|
* in linux/sched.h */
|
|
|
|
struct taskstats {
|
|
|
|
/* The version number of this struct. This field is always set to
|
|
* TAKSTATS_VERSION, which is defined in <linux/taskstats.h>.
|
|
* Each time the struct is changed, the value should be incremented.
|
|
*/
|
|
__u16 version;
|
|
__u32 ac_exitcode; /* Exit status */
|
|
|
|
/* The accounting flags of a task as defined in <linux/acct.h>
|
|
* Defined values are AFORK, ASU, ACOMPAT, ACORE, and AXSIG.
|
|
*/
|
|
__u8 ac_flag; /* Record flags */
|
|
__u8 ac_nice; /* task_nice */
|
|
|
|
/* Delay accounting fields start
|
|
*
|
|
* All values, until comment "Delay accounting fields end" are
|
|
* available only if delay accounting is enabled, even though the last
|
|
* few fields are not delays
|
|
*
|
|
* xxx_count is the number of delay values recorded
|
|
* xxx_delay_total is the corresponding cumulative delay in nanoseconds
|
|
*
|
|
* xxx_delay_total wraps around to zero on overflow
|
|
* xxx_count incremented regardless of overflow
|
|
*/
|
|
|
|
/* Delay waiting for cpu, while runnable
|
|
* count, delay_total NOT updated atomically
|
|
*/
|
|
__u64 cpu_count __attribute__((aligned(8)));
|
|
__u64 cpu_delay_total;
|
|
|
|
/* Following four fields atomically updated using task->delays->lock */
|
|
|
|
/* Delay waiting for synchronous block I/O to complete
|
|
* does not account for delays in I/O submission
|
|
*/
|
|
__u64 blkio_count;
|
|
__u64 blkio_delay_total;
|
|
|
|
/* Delay waiting for page fault I/O (swap in only) */
|
|
__u64 swapin_count;
|
|
__u64 swapin_delay_total;
|
|
|
|
/* cpu "wall-clock" running time
|
|
* On some architectures, value will adjust for cpu time stolen
|
|
* from the kernel in involuntary waits due to virtualization.
|
|
* Value is cumulative, in nanoseconds, without a corresponding count
|
|
* and wraps around to zero silently on overflow
|
|
*/
|
|
__u64 cpu_run_real_total;
|
|
|
|
/* cpu "virtual" running time
|
|
* Uses time intervals seen by the kernel i.e. no adjustment
|
|
* for kernel's involuntary waits due to virtualization.
|
|
* Value is cumulative, in nanoseconds, without a corresponding count
|
|
* and wraps around to zero silently on overflow
|
|
*/
|
|
__u64 cpu_run_virtual_total;
|
|
/* Delay accounting fields end */
|
|
/* version 1 ends here */
|
|
|
|
/* Basic Accounting Fields start */
|
|
char ac_comm[TS_COMM_LEN]; /* Command name */
|
|
__u8 ac_sched __attribute__((aligned(8)));
|
|
/* Scheduling discipline */
|
|
__u8 ac_pad[3];
|
|
__u32 ac_uid __attribute__((aligned(8)));
|
|
/* User ID */
|
|
__u32 ac_gid; /* Group ID */
|
|
__u32 ac_pid; /* Process ID */
|
|
__u32 ac_ppid; /* Parent process ID */
|
|
__u32 ac_btime; /* Begin time [sec since 1970] */
|
|
__u64 ac_etime __attribute__((aligned(8)));
|
|
/* Elapsed time [usec] */
|
|
__u64 ac_utime; /* User CPU time [usec] */
|
|
__u64 ac_stime; /* SYstem CPU time [usec] */
|
|
__u64 ac_minflt; /* Minor Page Fault Count */
|
|
__u64 ac_majflt; /* Major Page Fault Count */
|
|
/* Basic Accounting Fields end */
|
|
|
|
/* Extended accounting fields start */
|
|
/* Accumulated RSS usage in duration of a task, in MBytes-usecs.
|
|
* The current rss usage is added to this counter every time
|
|
* a tick is charged to a task's system time. So, at the end we
|
|
* will have memory usage multiplied by system time. Thus an
|
|
* average usage per system time unit can be calculated.
|
|
*/
|
|
__u64 coremem; /* accumulated RSS usage in MB-usec */
|
|
/* Accumulated virtual memory usage in duration of a task.
|
|
* Same as acct_rss_mem1 above except that we keep track of VM usage.
|
|
*/
|
|
__u64 virtmem; /* accumulated VM usage in MB-usec */
|
|
|
|
/* High watermark of RSS and virtual memory usage in duration of
|
|
* a task, in KBytes.
|
|
*/
|
|
__u64 hiwater_rss; /* High-watermark of RSS usage, in KB */
|
|
__u64 hiwater_vm; /* High-water VM usage, in KB */
|
|
|
|
/* The following four fields are I/O statistics of a task. */
|
|
__u64 read_char; /* bytes read */
|
|
__u64 write_char; /* bytes written */
|
|
__u64 read_syscalls; /* read syscalls */
|
|
__u64 write_syscalls; /* write syscalls */
|
|
/* Extended accounting fields end */
|
|
|
|
#define TASKSTATS_HAS_IO_ACCOUNTING
|
|
/* Per-task storage I/O accounting starts */
|
|
__u64 read_bytes; /* bytes of read I/O */
|
|
__u64 write_bytes; /* bytes of write I/O */
|
|
__u64 cancelled_write_bytes; /* bytes of cancelled write I/O */
|
|
|
|
__u64 nvcsw; /* voluntary_ctxt_switches */
|
|
__u64 nivcsw; /* nonvoluntary_ctxt_switches */
|
|
|
|
/* time accounting for SMT machines */
|
|
__u64 ac_utimescaled; /* utime scaled on frequency etc */
|
|
__u64 ac_stimescaled; /* stime scaled on frequency etc */
|
|
__u64 cpu_scaled_run_real_total; /* scaled cpu_run_real_total */
|
|
|
|
/* Delay waiting for memory reclaim */
|
|
__u64 freepages_count;
|
|
__u64 freepages_delay_total;
|
|
|
|
/* Delay waiting for thrashing page */
|
|
__u64 thrashing_count;
|
|
__u64 thrashing_delay_total;
|
|
};
|
|
|
|
/*
|
|
* Commands sent from userspace
|
|
* Not versioned. New commands should only be inserted at the enum's end
|
|
* prior to __TASKSTATS_CMD_MAX
|
|
*/
|
|
|
|
enum {
|
|
TASKSTATS_CMD_UNSPEC = 0, /* Reserved */
|
|
TASKSTATS_CMD_GET, /* user->kernel request/get-response */
|
|
TASKSTATS_CMD_NEW, /* kernel->user event */
|
|
__TASKSTATS_CMD_MAX,
|
|
};
|
|
|
|
#define TASKSTATS_CMD_MAX (__TASKSTATS_CMD_MAX - 1)
|
|
|
|
enum {
|
|
TASKSTATS_TYPE_UNSPEC = 0, /* Reserved */
|
|
TASKSTATS_TYPE_PID, /* Process id */
|
|
TASKSTATS_TYPE_TGID, /* Thread group id */
|
|
TASKSTATS_TYPE_STATS, /* taskstats structure */
|
|
TASKSTATS_TYPE_AGGR_PID, /* contains pid + stats */
|
|
TASKSTATS_TYPE_AGGR_TGID, /* contains tgid + stats */
|
|
TASKSTATS_TYPE_NULL, /* contains nothing */
|
|
__TASKSTATS_TYPE_MAX,
|
|
};
|
|
|
|
#define TASKSTATS_TYPE_MAX (__TASKSTATS_TYPE_MAX - 1)
|
|
|
|
enum {
|
|
TASKSTATS_CMD_ATTR_UNSPEC = 0,
|
|
TASKSTATS_CMD_ATTR_PID,
|
|
TASKSTATS_CMD_ATTR_TGID,
|
|
TASKSTATS_CMD_ATTR_REGISTER_CPUMASK,
|
|
TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK,
|
|
__TASKSTATS_CMD_ATTR_MAX,
|
|
};
|
|
|
|
#define TASKSTATS_CMD_ATTR_MAX (__TASKSTATS_CMD_ATTR_MAX - 1)
|
|
|
|
/* NETLINK_GENERIC related info */
|
|
|
|
#define TASKSTATS_GENL_NAME "TASKSTATS"
|
|
#define TASKSTATS_GENL_VERSION 0x1
|
|
|
|
#endif /* _LINUX_TASKSTATS_H */
|