|
|
Created:
4 years, 3 months ago by sakal Modified:
4 years, 3 months ago Reviewers:
tommi CC:
webrtc-reviews_webrtc.org, henrika_webrtc, zhengzhonghou_agora.io, tterriberry_mozilla.com, fengyue_agora.io, peah-webrtc, mflodman Target Ref:
refs/pending/heads/master Project:
webrtc Visibility:
Public. |
DescriptionRemove name parameter from HistogramAdd function.
This name is only used for a DCHECK. Having it as a parameter leads to unnecessary string copying even on release builds.
This CL instead adds a GetHistogramName function that is only called on debug builds.
Checking if pointer is null is also moved outside HistogramAdd function. Having it there is confusing since Chromium implementation doesn't have it there.
BUG=webrtc:6329
Committed: https://crrev.com/71b8393b6a8bfc0f778fb77ef166fb574e1fa25b
Cr-Commit-Position: refs/heads/master@{#14263}
Patch Set 1 #Patch Set 2 : Remove check #Patch Set 3 : Add check to Android Metrics. #
Total comments: 2
Created: 4 years, 3 months ago
Messages
Total messages: 29 (19 generated)
Description was changed from ========== WIP: UMA changes BUG=webrtc:6329 ========== to ========== This name is only used for a DCHECK. Having it as a parameter leads to unnecessary string copying even on release builds. BUG=webrtc:6329 ==========
Description was changed from ========== This name is only used for a DCHECK. Having it as a parameter leads to unnecessary string copying even on release builds. BUG=webrtc:6329 ========== to ========== Remove name parameter from HistogramAdd function. This name is only used for a DCHECK. Having it as a parameter leads to unnecessary string copying even on release builds. This CL instead adds a GetHistogramName function that is only called on debug builds. BUG=webrtc:6329 ==========
Description was changed from ========== Remove name parameter from HistogramAdd function. This name is only used for a DCHECK. Having it as a parameter leads to unnecessary string copying even on release builds. This CL instead adds a GetHistogramName function that is only called on debug builds. BUG=webrtc:6329 ========== to ========== Remove name parameter from HistogramAdd function. This name is only used for a DCHECK. Having it as a parameter leads to unnecessary string copying even on release builds. This CL instead adds a GetHistogramName function that is only called on debug builds. Checking if pointer is null is also moved outside HistogramAdd function. Placing it there is confusing since for example Chromium implementation doesn't have it there. BUG=webrtc:6329 ==========
Description was changed from ========== Remove name parameter from HistogramAdd function. This name is only used for a DCHECK. Having it as a parameter leads to unnecessary string copying even on release builds. This CL instead adds a GetHistogramName function that is only called on debug builds. Checking if pointer is null is also moved outside HistogramAdd function. Placing it there is confusing since for example Chromium implementation doesn't have it there. BUG=webrtc:6329 ========== to ========== Remove name parameter from HistogramAdd function. This name is only used for a DCHECK. Having it as a parameter leads to unnecessary string copying even on release builds. This CL instead adds a GetHistogramName function that is only called on debug builds. Checking if pointer is null is also moved outside HistogramAdd function. Placing it there is confusing since Chromium implementation doesn't have it there. BUG=webrtc:6329 ==========
The CQ bit was checked by sakal@webrtc.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/...
sakal@webrtc.org changed reviewers: + tommi@webrtc.org
Description was changed from ========== Remove name parameter from HistogramAdd function. This name is only used for a DCHECK. Having it as a parameter leads to unnecessary string copying even on release builds. This CL instead adds a GetHistogramName function that is only called on debug builds. Checking if pointer is null is also moved outside HistogramAdd function. Placing it there is confusing since Chromium implementation doesn't have it there. BUG=webrtc:6329 ========== to ========== Remove name parameter from HistogramAdd function. This name is only used for a DCHECK. Having it as a parameter leads to unnecessary string copying even on release builds. This CL instead adds a GetHistogramName function that is only called on debug builds. Checking if pointer is null is also moved outside HistogramAdd function. Having it there is confusing since Chromium implementation doesn't have it there. BUG=webrtc:6329 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_x64_dbg on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/win_x64_dbg/builds/1203)
The CQ bit was checked by sakal@webrtc.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_arm64_rel on master.tryserver.webrtc (JOB_TIMED_OUT, no build URL) android_dbg on master.tryserver.webrtc (JOB_TIMED_OUT, no build URL) android_rel on master.tryserver.webrtc (JOB_TIMED_OUT, no build URL)
PTAL This needs to be landed first: https://codereview.chromium.org/2337913002/
lgtm https://codereview.webrtc.org/2337883003/diff/40001/webrtc/api/android/jni/an... File webrtc/api/android/jni/androidmetrics_jni.cc (right): https://codereview.webrtc.org/2337883003/diff/40001/webrtc/api/android/jni/an... webrtc/api/android/jni/androidmetrics_jni.cc:71: if (histogram) { Would it be a programmer error if histogram is 0? If so, the check shouldn't be needed
https://codereview.webrtc.org/2337883003/diff/40001/webrtc/api/android/jni/an... File webrtc/api/android/jni/androidmetrics_jni.cc (right): https://codereview.webrtc.org/2337883003/diff/40001/webrtc/api/android/jni/an... webrtc/api/android/jni/androidmetrics_jni.cc:71: if (histogram) { On 2016/09/15 17:16:48, tommi (webrtc) wrote: > Would it be a programmer error if histogram is 0? If so, the check shouldn't be > needed No, this can happen in other cases as well. HistogramFactoryGet* returns null if UMA stats are not enabled.
https://codereview.webrtc.org/2337883003/diff/40001/webrtc/api/android/jni/an... File webrtc/api/android/jni/androidmetrics_jni.cc (right): https://codereview.webrtc.org/2337883003/diff/40001/webrtc/api/android/jni/an... webrtc/api/android/jni/androidmetrics_jni.cc:71: if (histogram) { On 2016/09/15 17:16:48, tommi (webrtc) wrote: > Would it be a programmer error if histogram is 0? If so, the check shouldn't be > needed No, this can happen in other cases as well. HistogramFactoryGet* returns null if UMA stats are not enabled.
On 2016/09/15 19:31:04, sakal wrote: > https://codereview.webrtc.org/2337883003/diff/40001/webrtc/api/android/jni/an... > File webrtc/api/android/jni/androidmetrics_jni.cc (right): > > https://codereview.webrtc.org/2337883003/diff/40001/webrtc/api/android/jni/an... > webrtc/api/android/jni/androidmetrics_jni.cc:71: if (histogram) { > On 2016/09/15 17:16:48, tommi (webrtc) wrote: > > Would it be a programmer error if histogram is 0? If so, the check shouldn't > be > > needed > > No, this can happen in other cases as well. HistogramFactoryGet* returns null if > UMA stats are not enabled. OK, thanks for the explanation. Lgtm as is then.
The CQ bit was checked by sakal@webrtc.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_dbg on master.tryserver.webrtc (JOB_TIMED_OUT, no build URL)
The CQ bit was checked by sakal@webrtc.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/...
Message was sent while issue was closed.
Description was changed from ========== Remove name parameter from HistogramAdd function. This name is only used for a DCHECK. Having it as a parameter leads to unnecessary string copying even on release builds. This CL instead adds a GetHistogramName function that is only called on debug builds. Checking if pointer is null is also moved outside HistogramAdd function. Having it there is confusing since Chromium implementation doesn't have it there. BUG=webrtc:6329 ========== to ========== Remove name parameter from HistogramAdd function. This name is only used for a DCHECK. Having it as a parameter leads to unnecessary string copying even on release builds. This CL instead adds a GetHistogramName function that is only called on debug builds. Checking if pointer is null is also moved outside HistogramAdd function. Having it there is confusing since Chromium implementation doesn't have it there. BUG=webrtc:6329 ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== Remove name parameter from HistogramAdd function. This name is only used for a DCHECK. Having it as a parameter leads to unnecessary string copying even on release builds. This CL instead adds a GetHistogramName function that is only called on debug builds. Checking if pointer is null is also moved outside HistogramAdd function. Having it there is confusing since Chromium implementation doesn't have it there. BUG=webrtc:6329 ========== to ========== Remove name parameter from HistogramAdd function. This name is only used for a DCHECK. Having it as a parameter leads to unnecessary string copying even on release builds. This CL instead adds a GetHistogramName function that is only called on debug builds. Checking if pointer is null is also moved outside HistogramAdd function. Having it there is confusing since Chromium implementation doesn't have it there. BUG=webrtc:6329 Committed: https://crrev.com/71b8393b6a8bfc0f778fb77ef166fb574e1fa25b Cr-Commit-Position: refs/heads/master@{#14263} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/71b8393b6a8bfc0f778fb77ef166fb574e1fa25b Cr-Commit-Position: refs/heads/master@{#14263} |