Loading services/camera/libcameraservice/device3/Camera3Device.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ #include "device3/Camera3SharedOutputStream.h" #include "CameraService.h" #include "utils/CameraThreadState.h" #include "utils/TraceHFR.h" #include <algorithm> #include <tuple> Loading Loading @@ -2834,7 +2835,7 @@ void Camera3Device::onInflightMapFlushedLocked() { } void Camera3Device::removeInFlightMapEntryLocked(int idx) { ATRACE_CALL(); ATRACE_HFR_CALL(); nsecs_t duration = mInFlightMap.valueAt(idx).maxExpectedDuration; mInFlightMap.removeItemsAt(idx, 1); Loading services/camera/libcameraservice/device3/Camera3OutputStream.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include <utils/Log.h> #include <utils/Trace.h> #include "Camera3OutputStream.h" #include "utils/TraceHFR.h" #ifndef container_of #define container_of(ptr, type, member) \ Loading Loading @@ -160,7 +161,7 @@ Camera3OutputStream::~Camera3OutputStream() { status_t Camera3OutputStream::getBufferLocked(camera3_stream_buffer *buffer, const std::vector<size_t>&) { ATRACE_CALL(); ATRACE_HFR_CALL(); ANativeWindowBuffer* anb; int fenceFd = -1; Loading Loading @@ -190,7 +191,7 @@ status_t Camera3OutputStream::queueBufferToConsumer(sp<ANativeWindow>& consumer, status_t Camera3OutputStream::returnBufferLocked( const camera3_stream_buffer &buffer, nsecs_t timestamp, const std::vector<size_t>& surface_ids) { ATRACE_CALL(); ATRACE_HFR_CALL(); status_t res = returnAnyBufferLocked(buffer, timestamp, /*output*/true, surface_ids); Loading Loading @@ -516,7 +517,7 @@ status_t Camera3OutputStream::configureConsumerQueueLocked() { } status_t Camera3OutputStream::getBufferLockedCommon(ANativeWindowBuffer** anb, int* fenceFd) { ATRACE_CALL(); ATRACE_HFR_CALL(); status_t res; if ((res = getBufferPreconditionCheckLocked()) != OK) { Loading services/camera/libcameraservice/device3/Camera3Stream.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <utils/Trace.h> #include "device3/Camera3Stream.h" #include "device3/StatusTracker.h" #include "utils/TraceHFR.h" #include <cutils/properties.h> Loading Loading @@ -601,7 +602,7 @@ status_t Camera3Stream::tearDown() { status_t Camera3Stream::getBuffer(camera3_stream_buffer *buffer, nsecs_t waitBufferTimeout, const std::vector<size_t>& surface_ids) { ATRACE_CALL(); ATRACE_HFR_CALL(); Mutex::Autolock l(mLock); status_t res = OK; Loading Loading @@ -682,7 +683,7 @@ void Camera3Stream::removeOutstandingBuffer(const camera3_stream_buffer &buffer) status_t Camera3Stream::returnBuffer(const camera3_stream_buffer &buffer, nsecs_t timestamp, bool timestampIncreasing, const std::vector<size_t>& surface_ids, uint64_t frameNumber) { ATRACE_CALL(); ATRACE_HFR_CALL(); Mutex::Autolock l(mLock); // Check if this buffer is outstanding. Loading services/camera/libcameraservice/utils/TraceHFR.h 0 → 100644 +28 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 The Android Open Source Project * * 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 applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef ANDROID_SERVERS_ENABLE_HFR_TRACES_H_ #define ANDROID_SERVERS_ENABLE_HFR_TRACES_H_ #include <utils/Trace.h> #ifdef HFR_ENABLE_TRACING #define ATRACE_HFR_CALL() ATRACE_CALL() #else #define ATRACE_HFR_CALL() #endif #endif Loading
services/camera/libcameraservice/device3/Camera3Device.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ #include "device3/Camera3SharedOutputStream.h" #include "CameraService.h" #include "utils/CameraThreadState.h" #include "utils/TraceHFR.h" #include <algorithm> #include <tuple> Loading Loading @@ -2834,7 +2835,7 @@ void Camera3Device::onInflightMapFlushedLocked() { } void Camera3Device::removeInFlightMapEntryLocked(int idx) { ATRACE_CALL(); ATRACE_HFR_CALL(); nsecs_t duration = mInFlightMap.valueAt(idx).maxExpectedDuration; mInFlightMap.removeItemsAt(idx, 1); Loading
services/camera/libcameraservice/device3/Camera3OutputStream.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include <utils/Log.h> #include <utils/Trace.h> #include "Camera3OutputStream.h" #include "utils/TraceHFR.h" #ifndef container_of #define container_of(ptr, type, member) \ Loading Loading @@ -160,7 +161,7 @@ Camera3OutputStream::~Camera3OutputStream() { status_t Camera3OutputStream::getBufferLocked(camera3_stream_buffer *buffer, const std::vector<size_t>&) { ATRACE_CALL(); ATRACE_HFR_CALL(); ANativeWindowBuffer* anb; int fenceFd = -1; Loading Loading @@ -190,7 +191,7 @@ status_t Camera3OutputStream::queueBufferToConsumer(sp<ANativeWindow>& consumer, status_t Camera3OutputStream::returnBufferLocked( const camera3_stream_buffer &buffer, nsecs_t timestamp, const std::vector<size_t>& surface_ids) { ATRACE_CALL(); ATRACE_HFR_CALL(); status_t res = returnAnyBufferLocked(buffer, timestamp, /*output*/true, surface_ids); Loading Loading @@ -516,7 +517,7 @@ status_t Camera3OutputStream::configureConsumerQueueLocked() { } status_t Camera3OutputStream::getBufferLockedCommon(ANativeWindowBuffer** anb, int* fenceFd) { ATRACE_CALL(); ATRACE_HFR_CALL(); status_t res; if ((res = getBufferPreconditionCheckLocked()) != OK) { Loading
services/camera/libcameraservice/device3/Camera3Stream.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <utils/Trace.h> #include "device3/Camera3Stream.h" #include "device3/StatusTracker.h" #include "utils/TraceHFR.h" #include <cutils/properties.h> Loading Loading @@ -601,7 +602,7 @@ status_t Camera3Stream::tearDown() { status_t Camera3Stream::getBuffer(camera3_stream_buffer *buffer, nsecs_t waitBufferTimeout, const std::vector<size_t>& surface_ids) { ATRACE_CALL(); ATRACE_HFR_CALL(); Mutex::Autolock l(mLock); status_t res = OK; Loading Loading @@ -682,7 +683,7 @@ void Camera3Stream::removeOutstandingBuffer(const camera3_stream_buffer &buffer) status_t Camera3Stream::returnBuffer(const camera3_stream_buffer &buffer, nsecs_t timestamp, bool timestampIncreasing, const std::vector<size_t>& surface_ids, uint64_t frameNumber) { ATRACE_CALL(); ATRACE_HFR_CALL(); Mutex::Autolock l(mLock); // Check if this buffer is outstanding. Loading
services/camera/libcameraservice/utils/TraceHFR.h 0 → 100644 +28 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 The Android Open Source Project * * 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 applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef ANDROID_SERVERS_ENABLE_HFR_TRACES_H_ #define ANDROID_SERVERS_ENABLE_HFR_TRACES_H_ #include <utils/Trace.h> #ifdef HFR_ENABLE_TRACING #define ATRACE_HFR_CALL() ATRACE_CALL() #else #define ATRACE_HFR_CALL() #endif #endif