python_code
stringlengths
0
679k
repo_name
stringlengths
9
41
file_path
stringlengths
6
149
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/test_health.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/test_starter.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/test_dcgm_apprunners.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/test_other.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/test_modules.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/test_policy.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/test_dcgm_fluentd.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/test_action.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/test_instances.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/test_dcgm_prometheus.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/test_topology.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/stubs/collectd_tester_api_cosmos.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/stubs/prometheus_tester_api.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/stubs/prometheus_tester_globals.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/stubs/collectd_tester_globals.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/stubs/collectd_tester_api.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/common_tests/test_dcgm_client_cli_parser.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/common_tests/test_dcgm_client_main.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/common_tests/__init__.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/common_tests/test_struct.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/nvswitch_tests/__init__.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/nvswitch_tests/test_nvswitch_with_running_fm.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/tests/nvswitch_tests/test_nvswitch_utils.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/common/__init__.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/common/dcgm_client_cli_parser.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/common/Struct.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/common/dcgm_client_main.py
DCGM-master
testing/python3/libs_3rdparty/__init__.py
from .initialise import init, deinit, reinit from .ansi import Fore, Back, Style from .ansitowin32 import AnsiToWin32 VERSION = '0.2.4'
DCGM-master
testing/python3/libs_3rdparty/colorama/__init__.py
# from winbase.h STDOUT = -11 STDERR = -12 try: from ctypes import windll except ImportError: windll = None SetConsoleTextAttribute = lambda *_: None else: from ctypes import ( byref, Structure, c_char, c_short, c_uint32, c_ushort ) handles = { STDOUT: windll.kernel32.GetStdHa...
DCGM-master
testing/python3/libs_3rdparty/colorama/win32.py
import re import sys from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style from .winterm import WinTerm, WinColor, WinStyle from .win32 import windll if windll is not None: winterm = WinTerm() def is_a_tty(stream): return hasattr(stream, 'isatty') and stream.isatty() class StreamWrapper(object): ''...
DCGM-master
testing/python3/libs_3rdparty/colorama/ansitowin32.py
''' This module generates ANSI character codes to printing colors to terminals. See: http://en.wikipedia.org/wiki/ANSI_escape_code ''' CSI = '\033[' def code_to_chars(code): return CSI + str(code) + 'm' class AnsiCodes(object): def __init__(self, codes): for name in dir(codes): if not nam...
DCGM-master
testing/python3/libs_3rdparty/colorama/ansi.py
from . import win32 # from wincon.h class WinColor(object): BLACK = 0 BLUE = 1 GREEN = 2 CYAN = 3 RED = 4 MAGENTA = 5 YELLOW = 6 GREY = 7 # from wincon.h class WinStyle(object): NORMAL = 0x00 # dim text, dim background BRIGHT = 0x08 # bright text, dim backgr...
DCGM-master
testing/python3/libs_3rdparty/colorama/winterm.py
import atexit import sys from .ansitowin32 import AnsiToWin32 orig_stdout = sys.stdout orig_stderr = sys.stderr wrapped_stdout = sys.stdout wrapped_stderr = sys.stderr atexit_done = False def reset_all(): AnsiToWin32(orig_stdout).reset_all() def init(autoreset=False, convert=None, strip=None, wrap=True): ...
DCGM-master
testing/python3/libs_3rdparty/colorama/initialise.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/apps/nvpex2.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/apps/dcgmi_app.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/apps/lsof_app.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/apps/xid_app.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/apps/__init__.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/apps/performance_stats.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/apps/dcgm_stub_runner_app.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/apps/cuda_assert_app.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/apps/dcgm_unittests_app.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/apps/cuda_ctx_create_app.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/apps/dcgm_diag_unittests_app.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/apps/p2p_bandwidth.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/apps/nvidia_smi_app.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/apps/app_runner.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/apps/lspci_app.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/apps/nv_hostengine_app.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
testing/python3/apps/dcgmproftester_app.py
#!/usr/bin/env python3 # Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
DCGM-master
scripts/get_build_branch.py
#!/usr/bin/env python # Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
DCGM-master
scripts/gatherSourceCode.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
build/version_filter.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DCGM-master
dcgm_wsgi/dcgm_wsgi.py
#!/usr/bin/env python3 # # Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
DCGM-master
nvml-injection/scripts/generate_nvml_stubs.py
# SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 """ Config module """ import os import configparser class Config(configparser.SectionProxy): #pylint: disable=too-many-ancestors """ Wraps a ConfigParser dict-like to allow over...
air_agent-main
config.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 AGENT_VERSION = '3.0.1'
air_agent-main
version.py
air_agent-main
__init__.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 """ Platform detection functions """ import logging import subprocess import traceback def detect(): """ Detect the current platform """ os = None release ...
air_agent-main
platform_detect.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 """ Executor functions for post-clone instructions """ import json import logging import subprocess import traceback def shell(instructions): """ Executor for shell co...
air_agent-main
executors.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 """ The NVIDIA Air Agent is a systemd service that detects if a VM has been cloned. When a clone operation has been detected, it calls out to the Air API to see if there are any...
air_agent-main
agent.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 """ Test utils """ import configparser CONFIG_FILE = 'tests/agent.ini' def load_config(): """ Helper function to load the test config file. Returns: dict - A...
air_agent-main
tests/util.py
air_agent-main
tests/__init__.py
# SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 """ Unit tests for Config module """ #pylint: disable=unused-argument,missing-class-docstring,missing-function-docstring #pylint: disable=arguments-differ,no-self-use,too-many-public-...
air_agent-main
tests/test_config.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 """ Unit tests for Agent module """ #pylint: disable=unused-argument,missing-class-docstring,missing-function-docstring #pylint: disable=arguments-differ,no-self-use,too-many-pu...
air_agent-main
tests/tests.py
# -*- coding: utf-8 -*- # # The Linux Kernel documentation build configuration file, created by # sphinx-quickstart on Fri Feb 12 13:51:46 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated fi...
grace-kernel-grace-kernel-6.1.y
Documentation/conf.py
#!/usr/bin/env python # add symbolic names to read_msr / write_msr in trace # decode_msr msr-index.h < trace import sys import re msrs = dict() with open(sys.argv[1] if len(sys.argv) > 1 else "msr-index.h", "r") as f: for j in f: m = re.match(r'#define (MSR_\w+)\s+(0x[0-9a-fA-F]+)', j) if m: msrs[int(m.group(...
grace-kernel-grace-kernel-6.1.y
Documentation/trace/postprocess/decode_msr.py
#!/usr/bin/env python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric...
grace-kernel-grace-kernel-6.1.y
Documentation/target/tcm_mod_builder.py
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) # any later version. # # This program i...
grace-kernel-grace-kernel-6.1.y
Documentation/networking/device_drivers/atm/cxacru-cf.py
# coding=utf-8 # SPDX-License-Identifier: GPL-2.0 # u""" kernel-feat ~~~~~~~~~~~ Implementation of the ``kernel-feat`` reST-directive. :copyright: Copyright (C) 2016 Markus Heiser :copyright: Copyright (C) 2016-2019 Mauro Carvalho Chehab :maintained-by: Mauro Carvalho Chehab <mchehab+samsu...
grace-kernel-grace-kernel-6.1.y
Documentation/sphinx/kernel_feat.py
# -*- coding: utf-8; mode: python -*- # pylint: disable=W0141,C0113,C0103,C0325 u""" cdomain ~~~~~~~ Replacement for the sphinx c-domain. :copyright: Copyright (C) 2016 Markus Heiser :license: GPL Version 2, June 1991 see Linux/COPYING for details. List of customizations: * Moved th...
grace-kernel-grace-kernel-6.1.y
Documentation/sphinx/cdomain.py
#!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- # pylint: disable=R0903, C0330, R0914, R0912, E0401 u""" kernel-include ~~~~~~~~~~~~~~ Implementation of the ``kernel-include`` reST-directive. :copyright: Copyright (C) 2016 Markus Heiser :license: GPL Version 2, June 1991 see lin...
grace-kernel-grace-kernel-6.1.y
Documentation/sphinx/kernel_include.py
#!/usr/bin/env python # SPDX-License-Identifier: GPL-2.0 # -*- coding: utf-8; mode: python -*- # pylint: disable=R0903, C0330, R0914, R0912, E0401 u""" maintainers-include ~~~~~~~~~~~~~~~~~~~ Implementation of the ``maintainers-include`` reST-directive. :copyright: Copyright (C) 2019 Kees Cook <kee...
grace-kernel-grace-kernel-6.1.y
Documentation/sphinx/maintainers_include.py
# -*- coding: utf-8; mode: python -*- # coding=utf-8 # SPDX-License-Identifier: GPL-2.0 # u""" kernel-abi ~~~~~~~~~~ Implementation of the ``kernel-abi`` reST-directive. :copyright: Copyright (C) 2016 Markus Heiser :copyright: Copyright (C) 2016-2020 Mauro Carvalho Chehab :maintained-by: M...
grace-kernel-grace-kernel-6.1.y
Documentation/sphinx/kernel_abi.py
#!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- # pylint: disable=C0330, R0903, R0912 u""" flat-table ~~~~~~~~~~ Implementation of the ``flat-table`` reST-directive. :copyright: Copyright (C) 2016 Markus Heiser :license: GPL Version 2, June 1991 see linux/COPYING for details. ...
grace-kernel-grace-kernel-6.1.y
Documentation/sphinx/rstFlatTable.py
# SPDX-License-Identifier: GPL-2.0 # # Sphinx has deprecated its older logging interface, but the replacement # only goes back to 1.6. So here's a wrapper layer to keep around for # as long as we support 1.4. # # We don't support 1.4 anymore, but we'll keep the wrappers around until # we change all the code to not use...
grace-kernel-grace-kernel-6.1.y
Documentation/sphinx/kernellog.py
# -*- coding: utf-8; mode: python -*- # pylint: disable=R0903, C0330, R0914, R0912, E0401 import os import sys from sphinx.util.osutil import fs_encoding # ------------------------------------------------------------------------------ def loadConfig(namespace): # ------------------------------------------------------...
grace-kernel-grace-kernel-6.1.y
Documentation/sphinx/load_config.py
# SPDX-License-Identifier: GPL-2.0 # Copyright 2019 Jonathan Corbet <corbet@lwn.net> # # Apply kernel-specific tweaks after the initial document processing # has been done. # from docutils import nodes import sphinx from sphinx import addnodes if sphinx.version_info[0] < 2 or \ sphinx.version_info[0] == 2 and sphinx...
grace-kernel-grace-kernel-6.1.y
Documentation/sphinx/automarkup.py
# coding=utf-8 # # Copyright © 2016 Intel Corporation # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, me...
grace-kernel-grace-kernel-6.1.y
Documentation/sphinx/kerneldoc.py
# -*- coding: utf-8; mode: python -*- # pylint: disable=C0103, R0903, R0912, R0915 u""" scalable figure and image handling ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sphinx extension which implements scalable image handling. :copyright: Copyright (C) 2016 Markus Heiser :license: GPL Version 2, June 1...
grace-kernel-grace-kernel-6.1.y
Documentation/sphinx/kfigure.py
# -*- coding: utf-8; mode: python -*- # SPDX-License-Identifier: GPL-2.0 project = 'Linux Media Subsystem Documentation' # It is possible to run Sphinx in nickpick mode with: nitpicky = True # within nit-picking build, do not refer to any intersphinx object intersphinx_mapping = {} # In nickpick mode, it will comp...
grace-kernel-grace-kernel-6.1.y
Documentation/userspace-api/media/conf_nitpick.py
#!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0-only # # Tool for analyzing boot timing # Copyright (c) 2013, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free...
grace-kernel-grace-kernel-6.1.y
tools/power/pm-graph/bootgraph.py
#!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0-only # # Tool for analyzing suspend/resume timing # Copyright (c) 2013, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published b...
grace-kernel-grace-kernel-6.1.y
tools/power/pm-graph/sleepgraph.py
#!/usr/bin/env python # SPDX-License-Identifier: GPL-2.0-only # -*- coding: utf-8 -*- # """ This utility can be used to debug and tune the performance of the intel_pstate driver. This utility can be used in two ways: - If there is Linux trace file with pstate_sample events enabled, then this utility can parse the trace...
grace-kernel-grace-kernel-6.1.y
tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
#!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0-only # -*- coding: utf-8 -*- # """ This utility can be used to debug and tune the performance of the AMD P-State driver. It imports intel_pstate_tracer to analyze AMD P-State trace event. Prerequisites: Python version 2.7.x or higher gnuplot 5.0 or high...
grace-kernel-grace-kernel-6.1.y
tools/power/x86/amd_pstate_tracer/amd_pstate_trace.py
#!/usr/bin/env python3 # # Copyright (C) 2022 Roman Gushchin <roman.gushchin@linux.dev> # Copyright (C) 2022 Meta import os import argparse import sys def scan_cgroups(cgroup_root): cgroups = {} for root, subdirs, _ in os.walk(cgroup_root): for cgroup in subdirs: path = os.path.join(root...
grace-kernel-grace-kernel-6.1.y
tools/cgroup/memcg_shrinker.py
#!/usr/bin/env drgn # # Copyright (C) 2020 Roman Gushchin <guro@fb.com> # Copyright (C) 2020 Facebook from os import stat import argparse import sys from drgn.helpers.linux import list_for_each_entry, list_empty from drgn.helpers.linux import for_each_page from drgn.helpers.linux.cpumask import for_each_online_cpu fr...
grace-kernel-grace-kernel-6.1.y
tools/cgroup/memcg_slabinfo.py
#!/usr/bin/env python3 # # Copyright (C) 2019 Tejun Heo <tj@kernel.org> # Copyright (C) 2019 Andy Newell <newella@fb.com> # Copyright (C) 2019 Facebook desc = """ Generate linear IO cost model coefficients used by the blk-iocost controller. If the target raw testdev is specified, destructive tests are performed again...
grace-kernel-grace-kernel-6.1.y
tools/cgroup/iocost_coef_gen.py
#!/usr/bin/env drgn # # Copyright (C) 2019 Tejun Heo <tj@kernel.org> # Copyright (C) 2019 Facebook desc = """ This is a drgn script to monitor the blk-iocost cgroup controller. See the comment at the top of block/blk-iocost.c for more details. For drgn, visit https://github.com/osandov/drgn. """ import sys import re ...
grace-kernel-grace-kernel-6.1.y
tools/cgroup/iocost_monitor.py
#!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0 from subprocess import PIPE, Popen import json import time import argparse import collections import sys # # Test port split configuration using devlink-port lanes attribute. # The test is skipped in case the attribute is not available. # # First, check that a...
grace-kernel-grace-kernel-6.1.y
tools/testing/selftests/net/devlink_port_split.py
#!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0 # Controls the openvswitch module. Part of the kselftest suite, but # can be used for some diagnostic purpose as well. import argparse import errno import sys try: from pyroute2 import NDB from pyroute2.netlink import NLM_F_ACK from pyroute2.net...
grace-kernel-grace-kernel-6.1.y
tools/testing/selftests/net/openvswitch/ovs-dpctl.py
#!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0 from struct import pack from time import sleep import errno import glob import os import subprocess try: import pytest except ImportError: print("Unable to import pytest python module.") print("\nIf not already installed, you may do so with:") ...
grace-kernel-grace-kernel-6.1.y
tools/testing/selftests/drivers/sdsi/sdsi_test.py
#!/usr/bin/env python # SPDX-License-Identifier: GPL-2.0 import subprocess import json as j import random class SkipTest(Exception): pass class RandomValuePicker: """ Class for storing shared buffer configuration. Can handle 3 different objects, pool, tcbind and portpool. Provide an interface to ge...
grace-kernel-grace-kernel-6.1.y
tools/testing/selftests/drivers/net/mlxsw/sharedbuffer_configuration.py
#!/usr/bin/env python3 from enum import Enum class ResultState(Enum): noresult = -1 skip = 0 success = 1 fail = 2 class TestResult: def __init__(self, test_id="", test_name=""): self.test_id = test_id self.test_name = test_name self.result = ResultState.noresult self.f...
grace-kernel-grace-kernel-6.1.y
tools/testing/selftests/tc-testing/TdcResults.py
""" tdc_config_local.py - tdc plugin-writer-specified values Copyright (C) 2017 bjb@mojatatu.com """ import os ENVIR = os.environ.copy() ENV_LD_LIBRARY_PATH = os.getenv('LD_LIBRARY_PATH', '') ENV_OTHER_LIB = os.getenv('OTHER_LIB', '') # example adding value to NAMES, without editing tdc_config.py EXTRA_NAMES = di...
grace-kernel-grace-kernel-6.1.y
tools/testing/selftests/tc-testing/tdc_config_local_template.py
#!/usr/bin/env python3 class TdcPlugin: def __init__(self): super().__init__() print(' -- {}.__init__'.format(self.sub_class)) def pre_suite(self, testcount, testidlist): '''run commands before test_runner goes into a test loop''' self.testcount = testcount self.testidl...
grace-kernel-grace-kernel-6.1.y
tools/testing/selftests/tc-testing/TdcPlugin.py
""" # SPDX-License-Identifier: GPL-2.0 tdc_helper.py - tdc helper functions Copyright (C) 2017 Lucas Bates <lucasb@mojatatu.com> """ def get_categorized_testlist(alltests, ucat): """ Sort the master test list into categories. """ testcases = dict() for category in ucat: testcases[category] = list...
grace-kernel-grace-kernel-6.1.y
tools/testing/selftests/tc-testing/tdc_helper.py
#!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0 """ tdc_multibatch.py - a thin wrapper over tdc_batch.py to generate multiple batch files Copyright (C) 2019 Vlad Buslov <vladbu@mellanox.com> """ import argparse import os parser = argparse.ArgumentParser( description='TC multiple batch file generator') ...
grace-kernel-grace-kernel-6.1.y
tools/testing/selftests/tc-testing/tdc_multibatch.py
#!/usr/bin/env python3 """ tdc_batch.py - a script to generate TC batch file Copyright (C) 2017 Chris Mi <chrism@mellanox.com> """ import argparse parser = argparse.ArgumentParser(description='TC batch file generator') parser.add_argument("device", help="device name") parser.add_argument("file", help="batch file na...
grace-kernel-grace-kernel-6.1.y
tools/testing/selftests/tc-testing/tdc_batch.py