/external/perfetto/src/profiling/common/ |
D | proc_cmdline_unittest.cc | 29 char cmdline[] = "surfaceflinger"; in TEST() local 30 EXPECT_EQ(cmdline, FindBinaryName(cmdline, sizeof(cmdline) - 1)); in TEST() 34 char cmdline[] = "surfaceflinger\0--flag"; in TEST() local 35 EXPECT_EQ(cmdline, FindBinaryName(cmdline, sizeof(cmdline) - 1)); in TEST() 39 char cmdline[] = "/system/bin/surfaceflinger\0--flag\0--flag2"; in TEST() local 40 EXPECT_STREQ("surfaceflinger", FindBinaryName(cmdline, sizeof(cmdline) - 1)); in TEST() 45 char cmdline[] = "android.hardware.graphics.composer@2.2-service"; in TEST() local 46 EXPECT_EQ(cmdline, FindBinaryName(cmdline, sizeof(cmdline) - 1)); in TEST() 49 char cmdline[] = "com.google.android.googlequicksearchbox:search"; in TEST() local 50 EXPECT_EQ(cmdline, FindBinaryName(cmdline, sizeof(cmdline) - 1)); in TEST() [all …]
|
D | proc_utils.cc | 120 // Normalize cmdline in place. Stores new beginning of string in *cmdline_ptr. 124 char* cmdline = *cmdline_ptr; in NormalizeCmdLine() local 125 char* first_arg = static_cast<char*>(memchr(cmdline, '\0', size)); in NormalizeCmdLine() 132 char* first_at = static_cast<char*>(memchr(cmdline, '@', size)); in NormalizeCmdLine() 138 memrchr(cmdline, '/', static_cast<size_t>(first_arg - cmdline))); in NormalizeCmdLine() 140 start = cmdline; in NormalizeCmdLine() 155 std::string cmdline = cmdlines[i]; // mutable copy in NormalizeCmdlines() local 157 cmdline.resize(cmdline.size() + 1, '\0'); in NormalizeCmdlines() 158 char* cmdline_cstr = &(cmdline[0]); in NormalizeCmdlines() 159 ssize_t size = NormalizeCmdLine(&cmdline_cstr, cmdline.size()); in NormalizeCmdlines() [all …]
|
D | proc_cmdline.cc | 32 // Edge cases: the raw cmdline as read out of the kernel can have several 42 // return codepaths for the caller. So even if we read a non-conforming cmdline 54 std::string filename = "/proc/" + std::to_string(pid) + "/cmdline"; in ReadProcCmdlineForPID() 74 // Returns a pointer into |cmdline| corresponding to the argv0 without any 76 // to the length of the cmdline string as read out of procfs as a C string - 78 // cmdline[cmdline_len]. Note that normally the string itself will contain nul 85 const char* FindBinaryName(const char* cmdline, size_t cmdline_len) { in FindBinaryName() argument 87 // one if the process rewrote its cmdline without nul separators, and/or the in FindBinaryName() 88 // cmdline didn't fully fit into our read buffer. In such cases, proceed with in FindBinaryName() 91 static_cast<const char*>(memchr(cmdline, '\0', cmdline_len)); in FindBinaryName() [all …]
|
D | proc_cmdline.h | 34 // These functions let the profilers read a /proc/pid/cmdline, find the 40 // std::string cmdline; 41 // bool success = ReadProcCmdlineForPID(42, &cmdline); 43 // const char* binname = FindBinaryName(cmdline.c_str(), cmdline.size()); 44 // return MatchGlobPattern("test*", cmdline.c_str(), binname); 47 const char* FindBinaryName(const char* cmdline, size_t cmdline_len); 49 const char* cmdline,
|
/external/deqp/framework/delibs/deutil/ |
D | deCommandLine.c | 119 deCommandLine* cmdLine = (deCommandLine*)deCalloc(sizeof(deCommandLine)); in deCommandLine_parse() local 121 …if (!cmdLine || !(cmdLine->args = (char**)deCalloc(sizeof(char*)*(size_t)CharPtrArray_getNumElemen… in deCommandLine_parse() 123 deFree(cmdLine); in deCommandLine_parse() 129 cmdLine->numArgs = CharPtrArray_getNumElements(args); in deCommandLine_parse() 130 cmdLine->argBuf = buf; in deCommandLine_parse() 132 for (argNdx = 0; argNdx < cmdLine->numArgs; argNdx++) in deCommandLine_parse() 133 cmdLine->args[argNdx] = CharPtrArray_get(args, argNdx); in deCommandLine_parse() 136 return cmdLine; in deCommandLine_parse() 140 void deCommandLine_destroy (deCommandLine* cmdLine) in deCommandLine_destroy() argument 142 deFree(cmdLine->argBuf); in deCommandLine_destroy() [all …]
|
/external/deqp/framework/delibs/decpp/ |
D | deCommandLine.cpp | 34 namespace cmdline namespace 355 CommandLine cmdLine; in selfTest() local 356 const bool parseOk = parser.parse(0, DE_NULL, &cmdLine, err); in selfTest() 364 CommandLine cmdLine; in selfTest() local 365 const bool parseOk = parser.parse(DE_LENGTH_OF_ARRAY(args), &args[0], &cmdLine, err); in selfTest() 374 CommandLine cmdLine; in selfTest() local 375 const bool parseOk = parser.parse(DE_LENGTH_OF_ARRAY(args), &args[0], &cmdLine, err); in selfTest() 384 CommandLine cmdLine; in selfTest() local 385 const bool parseOk = parser.parse(DE_LENGTH_OF_ARRAY(args), &args[0], &cmdLine, err); in selfTest() 388 DE_TEST_ASSERT(cmdLine.getArgs().size() == DE_LENGTH_OF_ARRAY(args)); in selfTest() [all …]
|
/external/deqp/executor/tools/ |
D | xeCommandLineExecutor.cpp | 87 void registerOptions (de::cmdline::Parser& parser) in registerOptions() 89 using de::cmdline::Option; in registerOptions() 90 using de::cmdline::NamedValue; in registerOptions() 110 …<< Option<CmdLineArgs> (DE_NULL, "cmdline", "Additional command line arguments for the test binar… in registerOptions() 142 bool parseCommandLine (CommandLine& cmdLine, int argc, const char* const* argv) in parseCommandLine() argument 144 de::cmdline::Parser parser; in parseCommandLine() 145 de::cmdline::CommandLine opts; in parseCommandLine() 177 cmdLine.runMode = RUNMODE_START_SERVER; in parseCommandLine() 178 cmdLine.serverBinOrAddress = opts.getOption<opt::StartServer>(); in parseCommandLine() 182 cmdLine.runMode = RUNMODE_CONNECT; in parseCommandLine() [all …]
|
D | xeTestLogCompare.cpp | 76 static void registerOptions (de::cmdline::Parser& parser) in registerOptions() 78 using de::cmdline::Option; in registerOptions() 79 using de::cmdline::NamedValue; in registerOptions() 264 static bool runCompare (const CommandLine& cmdLine, std::ostream& dst) in runCompare() argument 270 XE_CHECK(!cmdLine.filenames.empty()); in runCompare() 275 results.resize(cmdLine.filenames.size()); in runCompare() 279 for (int ndx = 0; ndx < (int)cmdLine.filenames.size(); ndx++) in runCompare() 281 …readers.push_back(de::SharedPtr<LogFileReader>(new LogFileReader(results[ndx], cmdLine.filenames[n… in runCompare() 285 for (int ndx = 0; ndx < (int)cmdLine.filenames.size(); ndx++) in runCompare() 290 batchNames.push_back(de::FilePath(cmdLine.filenames[ndx].c_str()).getBaseName()); in runCompare() [all …]
|
D | xeExtractShaderPrograms.cpp | 77 static void writeShaderProgram (const CommandLine& cmdLine, const std::string& casePath, const xe::… in writeShaderProgram() argument 79 …const string basePath = string(de::FilePath::join(cmdLine.dstPath, casePath).getPath()) + "." + de… in writeShaderProgram() 108 static void extractShaderPrograms (const CommandLine& cmdLine, const std::string& casePath, const x… in extractShaderPrograms() argument 126 …writeShaderProgram(cmdLine, casePath, static_cast<const xe::ri::ShaderProgram&>(curItem), programN… in extractShaderPrograms() 143 ShaderProgramExtractHandler (const CommandLine& cmdLine) in ShaderProgramExtractHandler() argument 144 : m_cmdLine(cmdLine) in ShaderProgramExtractHandler() 183 static void extractShaderProgramsFromLogFile (const CommandLine& cmdLine) in extractShaderProgramsFromLogFile() argument 185 std::ifstream in (cmdLine.filename.c_str(), std::ifstream::binary|std::ifstream::in); in extractShaderProgramsFromLogFile() 186 ShaderProgramExtractHandler resultHandler (cmdLine); in extractShaderProgramsFromLogFile() 192 throw std::runtime_error(string("Failed to open '") + cmdLine.filename + "'"); in extractShaderProgramsFromLogFile() [all …]
|
D | xeMergeTestLogs.cpp | 148 static void mergeTestLogs (const CommandLine& cmdLine) in mergeTestLogs() argument 152 …for (vector<string>::const_iterator filename = cmdLine.srcFilenames.begin(); filename != cmdLine.s… in mergeTestLogs() 153 readLogFile(&batchResult, filename->c_str(), cmdLine.flags); in mergeTestLogs() 155 if (!cmdLine.dstFilename.empty()) in mergeTestLogs() 156 xe::writeBatchResultToFile(batchResult, cmdLine.dstFilename.c_str()); in mergeTestLogs() 168 static bool parseCommandLine (CommandLine& cmdLine, int argc, const char* const* argv) in parseCommandLine() argument 175 cmdLine.srcFilenames.push_back(arg); in parseCommandLine() 178 if (!cmdLine.dstFilename.empty()) in parseCommandLine() 180 cmdLine.dstFilename = arg+6; in parseCommandLine() 183 cmdLine.flags &= ~FLAG_USE_LAST_INFO; in parseCommandLine() [all …]
|
/external/python/cpython3/Python/ |
D | preconfig.c | 114 _PyPreCmdline_Clear(_PyPreCmdline *cmdline) in _PyPreCmdline_Clear() argument 116 _PyWideStringList_Clear(&cmdline->argv); in _PyPreCmdline_Clear() 117 _PyWideStringList_Clear(&cmdline->xoptions); in _PyPreCmdline_Clear() 122 _PyPreCmdline_SetArgv(_PyPreCmdline *cmdline, const _PyArgv *args) in _PyPreCmdline_SetArgv() argument 124 return _PyArgv_AsWstrList(args, &cmdline->argv); in _PyPreCmdline_SetArgv() 129 precmdline_get_preconfig(_PyPreCmdline *cmdline, const PyPreConfig *config) in precmdline_get_preconfig() argument 133 cmdline->ATTR = config->ATTR; \ in precmdline_get_preconfig() 145 precmdline_set_preconfig(const _PyPreCmdline *cmdline, PyPreConfig *config) in precmdline_set_preconfig() argument 148 config->ATTR = cmdline->ATTR in precmdline_set_preconfig() 159 _PyPreCmdline_SetConfig(const _PyPreCmdline *cmdline, PyConfig *config) in _PyPreCmdline_SetConfig() argument [all …]
|
/external/llvm/utils/lit/tests/ |
D | shtest-timeout.py | 92 # RUN: FileCheck --check-prefix=CHECK-CMDLINE-OVERRIDE-OUT < %t.cmdover.out %s 93 # RUN: FileCheck --check-prefix=CHECK-CMDLINE-OVERRIDE-ERR < %t.cmdover.err %s 95 # CHECK-CMDLINE-OVERRIDE-ERR: Forcing timeout to be 2 seconds 97 # CHECK-CMDLINE-OVERRIDE-OUT: TIMEOUT: per_test_timeout :: infinite_loop.py 98 # CHECK-CMDLINE-OVERRIDE-OUT: Timeout: Reached timeout of 2 seconds 99 # CHECK-CMDLINE-OVERRIDE-OUT: Command {{([0-9]+ )?}}Output 100 # CHECK-CMDLINE-OVERRIDE-OUT: Running infinite loop 102 # CHECK-CMDLINE-OVERRIDE-OUT: TIMEOUT: per_test_timeout :: quick_then_slow.py 103 # CHECK-CMDLINE-OVERRIDE-OUT: Timeout: Reached timeout of 2 seconds 104 # CHECK-CMDLINE-OVERRIDE-OUT: Command {{([0-9]+ )?}}Output [all …]
|
/external/crosvm/arch/src/ |
D | serial.rs | 162 #[error("Error appending to cmdline: {0}")] 170 /// Add serial options to the provided `cmdline` based on `serial_parameters`. 175 cmdline: &mut kernel_cmdline::Cmdline, in get_serial_cmdline() argument 186 cmdline in get_serial_cmdline() 191 cmdline in get_serial_cmdline() 207 cmdline in get_serial_cmdline() 226 use kernel_cmdline::Cmdline; 232 let mut cmdline = Cmdline::new(4096); in get_serial_cmdline_default() localVariable 236 get_serial_cmdline(&mut cmdline, &serial_parameters, "io") in get_serial_cmdline_default() 239 let cmdline_str = cmdline.as_str(); in get_serial_cmdline_default() [all …]
|
/external/ltp/testcases/kernel/security/integrity/ima/tests/ |
D | ima_kexec.sh | 7 # Verify that kexec cmdline is measured correctly. 20 local cmdline="$1" 23 printf "$cmdline" > file1 24 grep "kexec-cmdline" $ASCII_MEASUREMENTS > file2 80 local cmdline="$2" 84 kexec_cmd="$param=$cmdline" 85 if [ "$param" = '--reuse-cmdline' ]; then 86 cmdline="$(sed 's/BOOT_IMAGE=[^ ]* //' /proc/cmdline)" 98 if ! measure "$cmdline"; then 105 tst_res TPASS "kexec cmdline was measured correctly" [all …]
|
/external/webrtc/tools_webrtc/mb/ |
D | mb.py | 71 cmdline = [] 79 cmdline += [ 84 cmdline += [ 93 cmdline += ['bin\\run_{}.bat'.format(target)] 95 cmdline += ['bin/run_{}'.format(target)] 98 cmdline += [ 103 cmdline += [vpython_exe, '../../tools_webrtc/configure_pipewire.py'] 111 cmdline += [vpython_exe, '../../testing/xvfb.py'] 114 cmdline += [vpython_exe, '../../testing/test_env.py'] 123 cmdline += [ [all …]
|
/external/linux-kselftest/tools/testing/selftests/livepatch/ |
D | test-livepatch.sh | 13 # - load a livepatch that modifies the output from /proc/cmdline and 21 if [[ "$(cat /proc/cmdline)" != "$MOD_LIVEPATCH: this has been live patched" ]] ; then 29 if [[ "$(cat /proc/cmdline)" == "$MOD_LIVEPATCH: this has been live patched" ]] ; then 48 # - load a livepatch that modifies the output from /proc/cmdline and 58 grep 'live patched' /proc/cmdline > /dev/kmsg 63 grep 'live patched' /proc/cmdline > /dev/kmsg 69 grep 'live patched' /proc/cmdline > /dev/kmsg 75 grep 'live patched' /proc/cmdline > /dev/kmsg 108 # - load a livepatch that modifies the output from /proc/cmdline and 119 grep 'live patched' /proc/cmdline > /dev/kmsg [all …]
|
/external/crosvm/src/ |
D | main.rs | 22 use cmdline::RunCommand; 23 use cmdline::UsbAttachCommand; 25 use crosvm::cmdline; 48 use crosvm::cmdline::Command; 49 use crosvm::cmdline::CrossPlatformCommands; 50 use crosvm::cmdline::CrossPlatformDevicesCommands; 172 fn stop_vms(cmd: cmdline::StopCommand) -> std::result::Result<(), ()> { in stop_vms() 176 fn suspend_vms(cmd: cmdline::SuspendCommand) -> std::result::Result<(), ()> { in suspend_vms() 180 fn swap_vms(cmd: cmdline::SwapCommand) -> std::result::Result<(), ()> { in swap_vms() 181 use cmdline::SwapSubcommands::*; in swap_vms() [all …]
|
/external/crosvm/kernel_cmdline/src/ |
D | kernel_cmdline.rs | 59 pub struct Cmdline { struct 64 impl Cmdline { impl 65 /// Constructs an empty Cmdline with the given capacity, which includes the nul terminator. 67 pub fn new(capacity: usize) -> Cmdline { in new() argument 69 Cmdline { in new() 128 /// Returns the cmdline in progress without nul termination 134 impl From<Cmdline> for Vec<u8> { 135 fn from(c: Cmdline) -> Vec<u8> { in from() 148 let mut cl = Cmdline::new(100); in insert_hello_world() 153 let s = CString::new(cl).expect("failed to create CString from Cmdline"); in insert_hello_world() [all …]
|
/external/libopus/ |
D | Makefile.unix | 68 COMPILE.c.cmdline = $(CC) -c $(CFLAGS) -o $@ $< 70 LINK.o.cmdline = $(LINK.o) $^ $(LDLIBS) -o $@$(EXESUFFIX) 72 ARCHIVE.cmdline = $(AR) $(ARFLAGS) $@ $^ && $(RANLIB) $@ 75 $(COMPILE.c.cmdline) 78 $(COMPILE.cpp.cmdline) 120 $(ARCHIVE.cmdline) 123 $(LINK.o.cmdline) 126 $(LINK.o.cmdline) 129 $(LINK.o.cmdline) 132 $(LINK.o.cmdline) [all …]
|
D | Makefile.mips | 70 COMPILE.c.cmdline = $(CC) -c $(CFLAGS) -o $@ $< 72 LINK.o.cmdline = $(LINK.o) $^ $(LDLIBS) -o $@$(EXESUFFIX) 74 ARCHIVE.cmdline = $(AR) $(ARFLAGS) $@ $^ && $(RANLIB) $@ 77 $(COMPILE.c.cmdline) 80 $(COMPILE.cpp.cmdline) 122 $(ARCHIVE.cmdline) 125 $(LINK.o.cmdline) 128 $(LINK.o.cmdline) 131 $(LINK.o.cmdline) 134 $(LINK.o.cmdline) [all …]
|
/external/deqp/framework/opengl/ |
D | gluRenderConfig.cpp | 143 void parseRenderConfig (RenderConfig* config, const tcu::CommandLine& cmdLine) in parseRenderConfig() argument 145 switch (cmdLine.getSurfaceType()) in parseRenderConfig() 156 config->windowVisibility = parseWindowVisibility(cmdLine); in parseRenderConfig() 158 if (cmdLine.getSurfaceWidth() > 0) in parseRenderConfig() 159 config->width = cmdLine.getSurfaceWidth(); in parseRenderConfig() 161 if (cmdLine.getSurfaceHeight() > 0) in parseRenderConfig() 162 config->height = cmdLine.getSurfaceHeight(); in parseRenderConfig() 164 if (cmdLine.getGLConfigName() != DE_NULL) in parseRenderConfig() 165 parseConfigBitsFromName(config, cmdLine.getGLConfigName()); in parseRenderConfig() 167 if (cmdLine.getGLConfigId() >= 0) in parseRenderConfig() [all …]
|
/external/mesa3d/src/gallium/auxiliary/os/ |
D | os_process.c | 108 * \param cmdline returns the command line string 109 * \param size size of the cmdline buffer 113 os_get_command_line(char *cmdline, size_t size) in os_get_command_line() argument 118 strncpy(cmdline, args, size); in os_get_command_line() 120 cmdline[size - 1] = 0; in os_get_command_line() 124 int f = open("/proc/self/cmdline", O_RDONLY); in os_get_command_line() 126 const int n = read(f, cmdline, size - 1); in os_get_command_line() 131 if (cmdline[i] == 0) { in os_get_command_line() 132 cmdline[i] = ' '; in os_get_command_line() 136 cmdline[n] = 0; in os_get_command_line() [all …]
|
/external/python/setuptools/ |
D | launcher.c | 133 char **parse_argv(char *cmdline, int *argc) in parse_argv() argument 137 char **result = calloc(strlen(cmdline), sizeof(char *)); in parse_argv() 138 char *output = cmdline; in parse_argv() 145 while (isspace(*cmdline)) cmdline++; /* skip leading spaces */ in parse_argv() 148 c = *cmdline++; in parse_argv() 154 while (isspace(*cmdline)) cmdline++; /* skip leading spaces */ in parse_argv() 155 if (!*cmdline) return result; /* avoid empty arg if trailing ws */ in parse_argv() 231 char* cmdline; in join_executable_and_args() local 238 cmdline = (char*)calloc(len, sizeof(char)); in join_executable_and_args() 239 sprintf(cmdline, "%s", executable); in join_executable_and_args() [all …]
|
/external/avb/libavb/ |
D | avb_cmdline.c | 33 * values. Returns NULL on OOM, otherwise the cmdline with values 37 const char* cmdline, in avb_sub_cmdline() argument 62 * present in the command line. Note: the original cmdline is used here, in avb_sub_cmdline() 65 if (avb_strstr(cmdline, replace_str[n]) == NULL) { in avb_sub_cmdline() 89 ret = avb_replace(cmdline, replace_str[n], guid_buf); in avb_sub_cmdline() 101 * Duplicate cmdline to ret for additional substitutions below. in avb_sub_cmdline() 104 ret = avb_strdup(cmdline); in avb_sub_cmdline() 143 if (slot_data->cmdline != NULL) { in cmdline_append_option() 144 offset = avb_strlen(slot_data->cmdline); in cmdline_append_option() 155 avb_memcpy(new_cmdline, slot_data->cmdline, offset - 1); in cmdline_append_option() [all …]
|
/external/deqp/external/openglcts/modules/runner/ |
D | glcTestRunnerMain.cpp | 49 static bool parseCommandLine(CommandLine& cmdLine, int argc, const char* const* argv) in parseCommandLine() argument 77 cmdLine.runType = runTypes[ndx].runType; in parseCommandLine() 88 cmdLine.waiverPath = value; in parseCommandLine() 93 cmdLine.dstLogDir = value; in parseCommandLine() 97 cmdLine.flags = glcts::TestRunner::PRINT_SUMMARY; in parseCommandLine() 100 cmdLine.flags = glcts::TestRunner::VERBOSE_ALL; in parseCommandLine() 122 CommandLine cmdLine; in main() local 125 if (!parseCommandLine(cmdLine, argc, argv)) in main() 135 …glcts::TestRunner runner(static_cast<tcu::Platform&>(*platform.get()), archive, cmdLine.waiverPath… in main() 136 cmdLine.dstLogDir.c_str(), cmdLine.runType, cmdLine.flags); in main()
|