/developtools/hdc/src/common/ |
H A D | forward.cpp | 46 HCtxForward ctx = iter->second; in StopTask() local 47 ctxs.push_back(ctx); in StopTask() 52 for (auto ctx: ctxs) { in StopTask() 53 FreeContext(ctx, 0, false); in StopTask() 118 HCtxForward ctx = nullptr; in MallocContext() local 119 if ((ctx = new ContextForward()) == nullptr) { in MallocContext() 122 ctx->id = Base::GetRandomU32(); in MallocContext() 123 ctx->masterSlave = masterSlave; in MallocContext() 124 ctx->thisClass = this; in MallocContext() 125 ctx in MallocContext() 133 FreeContextCallBack(HCtxForward ctx) FreeContextCallBack() argument 149 FreeJDWP(HCtxForward ctx) FreeJDWP() argument 175 HCtxForward ctx = nullptr; FreeContext() local 257 HCtxForward ctx = (HCtxForward)stream->data; ReadForwardBuf() local 276 HCtxForward ctx = (HCtxForward)connection->data; ConnectTarget() local 317 SetupPointContinue(HCtxForward ctx, int status) SetupPointContinue() argument 664 DoForwardBegin(HCtxForward ctx) DoForwardBegin() argument 726 HCtxForward ctx = reinterpret_cast<HCtxForward>(ctxIO->ctxForward); SendCallbackForwardBuf() local 736 SendForwardBuf(HCtxForward ctx, uint8_t *bufPtr, const int size) SendForwardBuf() argument 780 CommandForwardCheckResult(HCtxForward ctx, uint8_t *payload) CommandForwardCheckResult() argument 809 HCtxForward ctx = nullptr; ForwardCommandDispatch() local [all...] |
H A D | forward.h | 72 bool SetupPointContinue(HCtxForward ctx, int status); 88 bool DoForwardBegin(HCtxForward ctx); 89 int SendForwardBuf(HCtxForward ctx, uint8_t *bufPtr, const int size); 92 int LoopFdRead(HCtxForward ctx); 93 void FreeContextCallBack(HCtxForward ctx); 94 void FreeJDWP(HCtxForward ctx); 101 bool CommandForwardCheckResult(HCtxForward ctx, uint8_t *payload);
|
/developtools/profiler/device/base/src/ |
H A D | epoll_event_poller.cpp | 47 auto ctx = std::make_shared<EventContext>(); in AddFileDescriptor() local 48 CHECK_NOTNULL(ctx, false, "create EventContext FAILED!"); in AddFileDescriptor() 49 ctx->fd = fd; in AddFileDescriptor() 50 ctx->onReadable = onReadable; in AddFileDescriptor() 51 ctx->onWritable = onWritable; in AddFileDescriptor() 54 CHECK_TRUE(AddContextLocked(ctx), false, "add context for %d failed!", fd); in AddFileDescriptor() 64 auto ctx = it->second; in RemoveFileDescriptor() local 65 CHECK_NOTNULL(ctx, false, "ctx null!"); in RemoveFileDescriptor() 66 CHECK_TRUE(RemoveContextLocked(ctx), fals in RemoveFileDescriptor() 70 AddContextLocked(const EventContextPtr& ctx) AddContextLocked() argument 76 RemoveContextLocked(const EventContextPtr& ctx) RemoveContextLocked() argument 97 UpdateEvent(int op, const EventContextPtr& ctx) UpdateEvent() argument 132 auto ctx = reinterpret_cast<EventContext*>(eventVec[i].data.ptr); Run() local 140 HandleEvent(uint32_t events, const EventContext& ctx) HandleEvent() argument [all...] |
/developtools/integration_verification/tools/fotff/utils/ |
H A D | hdc.go | 23 func WaitHDC(device string, ctx context.Context) bool { 24 ctx, cancelFn := context.WithTimeout(ctx, 20*time.Second) 28 case <-ctx.Done(): 32 ExecContext(ctx, hdc, "kill") 34 ExecContext(ctx, hdc, "start") 36 out, err := ExecCombinedOutputContext(ctx, hdc, "list", "targets") 58 func TryRebootToLoader(device string, ctx context.Context) error { 61 if connected := WaitHDC(device, ctx); connected { 63 return ExecContext(ctx, hd [all...] |
H A D | exec.go | 29 func ExecContext(ctx context.Context, name string, args ...string) error { 30 ctx, fn := context.WithTimeout(ctx, 6*time.Hour) 32 if err := execContext(ctx, name, args...); err != nil { 37 return execContext(ctx, name, args...) 42 func execContext(ctx context.Context, name string, args ...string) error { 45 cmd := exec.CommandContext(ctx, name, args...) 63 func ExecCombinedOutputContext(ctx context.Context, name string, args ...string) ([]byte, error) { 64 ctx, fn := context.WithTimeout(ctx, [all...] |
/developtools/profiler/device/plugins/ffrt_profiler/service/src/ |
H A D | ffrt_profiler_manager.cpp | 150 PROFILER_LOG_ERROR(LOG_CORE, "StartFfrtProfiler ctx is empty"); in StartFfrtProfiler() 206 bool FfrtProfilerManager::HandleFfrtProfilerContext(const std::shared_ptr<FfrtProfilerCtx>& ctx) in HandleFfrtProfilerContext() argument 208 if (ctx == nullptr) { in HandleFfrtProfilerContext() 211 if (ctx->pid > 0) { in HandleFfrtProfilerContext() 212 ctx->smbName = "ffrt_profiler_smb_" + std::to_string(ctx->pid); in HandleFfrtProfilerContext() 213 } else if (!ctx->processName.empty()) { in HandleFfrtProfilerContext() 214 ctx->smbName = "ffrt_profiler_smb_" + ctx->processName; in HandleFfrtProfilerContext() 217 ctx in HandleFfrtProfilerContext() 254 ReadShareMemory(std::shared_ptr<FfrtProfilerCtx> ctx) ReadShareMemory() argument [all...] |
/developtools/profiler/device/plugins/network_profiler/service/src/ |
H A D | network_profiler_manager.cpp | 159 PROFILER_LOG_ERROR(LOG_CORE, "StartNetworkProfiler ctx is empty"); in StartNetworkProfiler() 215 bool NetworkProfilerManager::HandleNetworkProfilerContext(const std::shared_ptr<NetworkProfilerCtx>& ctx) in HandleNetworkProfilerContext() argument 217 if (ctx == nullptr) { in HandleNetworkProfilerContext() 220 if (ctx->pid > 0) { in HandleNetworkProfilerContext() 221 ctx->smbName = "network_profiler_smb_" + std::to_string(ctx->pid); in HandleNetworkProfilerContext() 222 } else if (!ctx->processName.empty()) { in HandleNetworkProfilerContext() 223 ctx->smbName = "network_profiler_smb_" + ctx->processName; in HandleNetworkProfilerContext() 226 ctx in HandleNetworkProfilerContext() 263 ReadShareMemory(std::shared_ptr<NetworkProfilerCtx> ctx) ReadShareMemory() argument [all...] |
H A D | network_profiler_handle.cpp | 49 auto ctx = writerStruct_->startReport(writerStruct_); in SetWriter() local 50 if (ctx == nullptr) { in SetWriter() 54 protoData_ = ProtoEncoder::NetworkProfilerResult(ctx); in SetWriter() 139 RandomWriteCtx* ctx = nullptr; in FlushData() local 142 ctx = writerStruct_->startReport(writerStruct_); in FlushData() 143 if (ctx == nullptr) { in FlushData() 147 protoData_ = ProtoEncoder::NetworkProfilerResult(ctx); in FlushData()
|
/developtools/integration_verification/tools/fotff/rec/ |
H A D | fotff.go | 32 ctx context.Context 76 for _, ctx := range contexts { 77 if ctx.ctx.Value("index").(int) < success { 78 ctx.fn() 84 for _, ctx := range contexts { 85 if ctx.ctx.Value("index").(int) > fail { 86 ctx.fn() 101 ctx, f [all...] |
H A D | flashandtest.go | 21 func FlashAndTest(ctx context.Context, opt *FlashAndTestOptions) error { 23 if err := opt.M.Flash(opt.Device, opt.Version, ctx); err != nil { 29 if err := opt.T.Prepare(opt.M.PkgDir(opt.Version), opt.Device, ctx); err != nil { 36 results, err := opt.T.DoTestTask(opt.Device, ctx) 55 result, err := opt.T.DoTestCase(opt.Device, opt.TestCase, ctx)
|
/developtools/smartperf_host/trace_streamer/src/base/sqlite_ext/ |
H A D | sqlite_ext_funcs.cpp | 206 void BuildJson(sqlite3_context *ctx, int32_t argc, sqlite3_value **argv) in BuildJson() argument 211 sqlite3_result_error(ctx, "BuildJson arg number error", -1); in BuildJson() 220 sqlite3_result_error(ctx, "BuildJson: Invalid args", -1); in BuildJson() 229 sqlite3_result_error(ctx, "AppendSqlValueError", -1); in BuildJson() 237 sqlite3_result_blob(ctx, "", 0, nullptr); in BuildJson() 242 sqlite3_result_blob(ctx, data.release(), static_cast<int32_t>(raw.size()), free); in BuildJson() 245 void RepeatedJsonStep(sqlite3_context *ctx, int32_t argc, sqlite3_value **argv) in RepeatedJsonStep() argument 248 auto **jsonBuild = static_cast<JsonBuild **>(sqlite3_aggregate_context(ctx, sizeof(JsonBuild *))); in RepeatedJsonStep() 258 sqlite3_result_error(ctx, "BuildJson: Invalid args", -1); in RepeatedJsonStep() 267 sqlite3_result_error(ctx, "AppendSqlValueErro in RepeatedJsonStep() 275 RepeatedFieldStep(sqlite3_context *ctx, int32_t argc, sqlite3_value **argv) RepeatedFieldStep() argument 297 RepeatedFieldFinal(sqlite3_context *ctx) RepeatedFieldFinal() argument 319 RepeatedJsonFinal(sqlite3_context *ctx) RepeatedJsonFinal() argument 353 std::unique_ptr<JsonBuild> ctx = std::make_unique<JsonBuild>(); ts_create_extend_function() local [all...] |
/developtools/profiler/device/services/profiler_service/src/ |
H A D | profiler_service.cpp | 149 if (auto ctx = weakCtx.lock(); ctx != nullptr) { in StartPluginSessions() 150 ctx->StopPluginSessions(); in StartPluginSessions() 312 auto ctx = std::make_shared<SessionContext>(); in CreateSession() local 313 CHECK_POINTER_NOTNULL(ctx, "alloc SessionContext failed!"); in CreateSession() 316 ctx->service = this; in CreateSession() 318 ctx->dataRepeater = dataRepeater; in CreateSession() 321 ctx->traceFileWriter = traceWriter; in CreateSession() 323 ctx->sessionConfig = *sessionConfig; in CreateSession() 324 ctx in CreateSession() 497 auto ctx = GetSessionContext(sessionId); StartSession() local 540 auto ctx = GetSessionContext(sessionId); FetchData() local 598 auto ctx = GetSessionContext(sessionId); StopSession() local 624 auto ctx = GetSessionContext(sessionId); DestroySession() local 658 auto ctx = GetSessionContext(sessionId); KeepSession() local [all...] |
/developtools/integration_verification/tools/fotff/pkg/dayu200/ |
H A D | flash.go | 35 func (m *Manager) flashDevice(device string, pkg string, ctx context.Context) error { 36 if err := utils.TryRebootToLoader(device, ctx); err != nil { 39 if err := m.flashImages(device, pkg, ctx); err != nil { 43 if connected := utils.WaitHDC(device, ctx); !connected { 52 func (m *Manager) flashImages(device string, pkg string, ctx context.Context) error { 56 data, _ := utils.ExecCombinedOutputContext(ctx, m.FlashTool, "LD") 60 data, _ := utils.ExecCombinedOutputContext(ctx, m.FlashTool, "LD") 65 if err := utils.ExecContext(ctx, m.FlashTool, "-s", locationID, "UL", filepath.Join(m.Workspace, pkg, "MiniLoaderAll.bin"), "-noreset"); err != nil { 71 if err := utils.ExecContext(ctx, m.FlashTool, "-s", locationID, "UL", filepath.Join(m.Workspace, pkg, "MiniLoaderAll.bin"), "-noreset"); err != nil { 80 if err := utils.ExecContext(ctx, [all...] |
/developtools/profiler/device/plugins/native_daemon/src/ |
H A D | hook_manager.cpp | 245 bool HookManager::HandleHookContext(const std::shared_ptr<HookManagerCtx>& ctx) in HandleHookContext() argument 247 if (ctx == nullptr) { in HandleHookContext() 250 if (ctx->pid > 0) { in HandleHookContext() 251 ctx->smbName = "hooknativesmb_" + std::to_string(ctx->pid); in HandleHookContext() 252 } else if (!ctx->processName.empty()) { in HandleHookContext() 253 ctx->smbName = "hooknativesmb_" + ctx->processName; in HandleHookContext() 256 ctx->pid, ctx in HandleHookContext() [all...] |
/developtools/integration_verification/tools/fotff/tester/manual/ |
H A D | manual.go | 48 func (t *Tester) Prepare(pkgDir string, device string, ctx context.Context) error { 52 func (t *Tester) DoTestTask(deviceSN string, ctx context.Context) (ret []tester.Result, err error) { 53 return t.DoTestCases(deviceSN, []string{"default"}, ctx) 56 func (t *Tester) DoTestCase(deviceSN, testCase string, ctx context.Context) (ret tester.Result, err error) { 79 func (t *Tester) DoTestCases(deviceSN string, testcases []string, ctx context.Context) (ret []tester.Result, err error) { 81 r, err := t.DoTestCase(deviceSN, testcase, ctx)
|
/developtools/integration_verification/tools/fotff/tester/pkg_available/ |
H A D | pkg_available.go | 46 func (t *Tester) Prepare(pkgDir string, device string, ctx context.Context) error { 51 func (t *Tester) DoTestTask(deviceSN string, ctx context.Context) (ret []tester.Result, err error) { 52 return t.DoTestCases(deviceSN, []string{"pkg_available"}, ctx) 55 func (t *Tester) DoTestCase(deviceSN, testCase string, ctx context.Context) (ret tester.Result, err error) { 72 func (t *Tester) DoTestCases(deviceSN string, testcases []string, ctx context.Context) (ret []tester.Result, err error) { 74 r, err := t.DoTestCase(deviceSN, testcase, ctx)
|
/developtools/hdc/test/fuzztest/jdwpreadstream_fuzzer/ |
H A D | JdwpReadStream_fuzzer.cpp | 40 HdcJdwp::HCtxJdwp ctx = (HdcJdwp::HCtxJdwp)jdwp->MallocContext(); in FuzzJdwpReadStream() local 41 if (ctx == nullptr) { in FuzzJdwpReadStream() 42 WRITE_LOG(LOG_FATAL, "FuzzJdwpReadStream ctx is null"); in FuzzJdwpReadStream() 45 ctx->finish = true; in FuzzJdwpReadStream() 47 pipe.data = ctx; in FuzzJdwpReadStream() 51 delete ctx; in FuzzJdwpReadStream()
|
/developtools/integration_verification/tools/fotff/tester/ |
H A D | tester.go | 37 Prepare(pkgDir string, device string, ctx context.Context) error 39 DoTestTask(device string, ctx context.Context) ([]Result, error) 41 DoTestCase(device string, testCase string, ctx context.Context) (Result, error) 43 DoTestCases(device string, testcases []string, ctx context.Context) ([]Result, error)
|
/developtools/integration_verification/tools/fotff/pkg/gitee_common/ |
H A D | build.go | 35 func (m *Manager) Build(config BuildConfig, ctx context.Context) error { 40 err := m.BuildNoRetry(config, false, ctx) 46 err = m.BuildNoRetry(config, true, ctx) 67 func (m *Manager) BuildNoRetry(config BuildConfig, rm bool, ctx context.Context) error { 72 if err := utils.RunCmdViaSSHContext(ctx, server.Addr, server.User, server.Passwd, cmd); err != nil { 81 if err := utils.RunCmdViaSSHContext(ctx, server.Addr, server.User, server.Passwd, cmd); err != nil { 85 if err := utils.RunCmdViaSSHContextNoRetry(ctx, server.Addr, server.User, server.Passwd, cmd); err != nil { 90 if err := utils.RunCmdViaSSHContext(ctx, server.Addr, server.User, server.Passwd, cmd); err != nil { 95 if err := utils.RunCmdViaSSHContextNoRetry(ctx, server.Addr, server.User, server.Passwd, cmd); err != nil {
|
/developtools/smartperf_host/trace_streamer/src/parser/ebpf_parser/ |
H A D | ebpf_data_parser.cpp | 20 EbpfDataParser::EbpfDataParser(TraceDataCache *dataCache, const TraceStreamerFilters *ctx) in EbpfDataParser() argument 21 : EventParserBase(dataCache, ctx), in EbpfDataParser() 22 EbpfBase(dataCache, ctx), in EbpfDataParser() 23 FileSystemDataParser(dataCache, ctx), in EbpfDataParser() 24 PagedMemoryDataParser(dataCache, ctx), in EbpfDataParser() 25 BioLatencyDataParser(dataCache, ctx), in EbpfDataParser() 26 ebpfDataReader_(std::make_unique<EbpfDataReader>(dataCache, ctx)) in EbpfDataParser()
|
/developtools/hdc/test/fuzztest/forwardreadstream_fuzzer/ |
H A D | ForwardReadStream_fuzzer.cpp | 35 HdcForwardBase::HCtxForward ctx = (HdcForwardBase::HCtxForward)forward->MallocContext(true); in FuzzForwardReadStream() local 36 if (ctx == nullptr) { in FuzzForwardReadStream() 37 WRITE_LOG(LOG_FATAL, "FuzzForwardReadStream ctx is null"); in FuzzForwardReadStream() 40 uv_stream_t *stream = (uv_stream_t *)&ctx->tcp; in FuzzForwardReadStream() 45 delete ctx; in FuzzForwardReadStream()
|
/developtools/hdc/src/daemon/ |
H A D | jdwp.cpp | 64 HCtxJdwp ctx = nullptr; in MallocContext() local 65 if ((ctx = new ContextJdwp()) == nullptr) { in MallocContext() 68 ctx->isDebug = 0; in MallocContext() 69 ctx->thisClass = this; in MallocContext() 70 ctx->pipe.data = ctx; in MallocContext() 72 return ctx; in MallocContext() 76 void HdcJdwp::FreeContext(HCtxJdwp ctx) in FreeContext() argument 78 if (ctx->finish) { in FreeContext() 81 ctx in FreeContext() 376 HCtxJdwp ctx = (HCtxJdwp)req->data; SendCallbackJdwpNewFD() local 392 HCtxJdwp ctx = (HCtxJdwp)AdminContext(OP_QUERY, targetPID, nullptr); SendJdwpNewFD() local 428 HCtxJdwp ctx = (HCtxJdwp)AdminContext(OP_QUERY, pid, nullptr); SendArkNewFD() local 492 HCtxJdwp ctx = (HCtxJdwp)AdminContext(OP_QUERY, targetPID, nullptr); CheckPIDExist() local 673 HCtxJdwp ctx = static_cast<HCtxJdwp>(thisClass->AdminContext(OP_QUERY, targetPID, nullptr)); FdEventPollThread() local [all...] |
/developtools/integration_verification/tools/fotff/tester/mock/ |
H A D | mock.go | 34 func (t *Tester) Prepare(pkgDir string, device string, ctx context.Context) error { 38 func (t *Tester) DoTestTask(device string, ctx context.Context) ([]tester.Result, error) { 49 func (t *Tester) DoTestCase(device string, testCase string, ctx context.Context) (tester.Result, error) { 54 func (t *Tester) DoTestCases(device string, testcases []string, ctx context.Context) ([]tester.Result, error) { 57 r, err := t.DoTestCase(device, testcase, ctx)
|
/developtools/profiler/device/base/include/ |
H A D | epoll_event_poller.h | 60 bool UpdateEvent(int op, const EventContextPtr& ctx); 61 void HandleEvent(uint32_t events, const EventContext& ctx); 63 bool AddContextLocked(const EventContextPtr& ctx); 64 bool RemoveContextLocked(const EventContextPtr& ctx);
|
/developtools/integration_verification/tools/fotff/tester/xdevice/ |
H A D | xdevice.go | 67 func (t *Tester) Prepare(pkgDir string, device string, ctx context.Context) (err error) { 69 if err := utils.HdcShell(enableTestModeScript, device, ctx); err != nil { 73 if connected := utils.WaitHDC(device, ctx); !connected { 82 func (t *Tester) DoTestTask(deviceSN string, ctx context.Context) (ret []tester.Result, err error) { 88 if err := utils.ExecContext(ctx, "python", args...); err != nil { 98 func (t *Tester) DoTestCase(deviceSN, testCase string, ctx context.Context) (ret tester.Result, err error) { 104 if err := utils.ExecContext(ctx, "python", args...); err != nil { 122 func (t *Tester) DoTestCases(deviceSN string, testcases []string, ctx context.Context) (ret []tester.Result, err error) { 128 if err := utils.ExecContext(ctx, "python", args...); err != nil {
|