Adds logging of AudioManager create/restart [chromium/src : main]

0 views
Skip to first unread message

Olga Sharonova (Gerrit)

unread,
3:40 AM (12 hours ago) 3:40 AM
to Henrik Andreasson, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
Attention needed from Henrik Andreasson

Olga Sharonova added 1 comment

File services/audio/owning_audio_manager_accessor.cc
Line 137, Patchset 3 (Latest): am_base->LogAudioServiceStartup(
Olga Sharonova . unresolved

Why can't we log it in AM constructor?

Open in Gerrit

Related details

Attention is currently required from:
  • Henrik Andreasson
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I27244d66e3a4ea736166f6d5a6b6272c1274566c
Gerrit-Change-Number: 7633165
Gerrit-PatchSet: 3
Gerrit-Owner: Henrik Andreasson <hen...@chromium.org>
Gerrit-Reviewer: Henrik Andreasson <hen...@chromium.org>
Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
Gerrit-Attention: Henrik Andreasson <hen...@chromium.org>
Gerrit-Comment-Date: Thu, 05 Mar 2026 08:40:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Henrik Andreasson (Gerrit)

unread,
5:11 AM (11 hours ago) 5:11 AM
to Chromium LUCI CQ, Olga Sharonova, AyeAye, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
Attention needed from Olga Sharonova

Henrik Andreasson added 1 comment

File services/audio/owning_audio_manager_accessor.cc
Line 137, Patchset 3: am_base->LogAudioServiceStartup(
Olga Sharonova . unresolved

Why can't we log it in AM constructor?

Henrik Andreasson

We can and I have changed the design now.

It was easier to do it after AMB ctor was done since accessing the audio log factory directly in the ctor can be risky (breaks test and so on).

I tried to make a clean solution that should be safe.

Open in Gerrit

Related details

Attention is currently required from:
  • Olga Sharonova
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I27244d66e3a4ea736166f6d5a6b6272c1274566c
Gerrit-Change-Number: 7633165
Gerrit-PatchSet: 5
Gerrit-Owner: Henrik Andreasson <hen...@chromium.org>
Gerrit-Reviewer: Henrik Andreasson <hen...@chromium.org>
Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
Gerrit-Attention: Olga Sharonova <ol...@chromium.org>
Gerrit-Comment-Date: Thu, 05 Mar 2026 10:10:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Olga Sharonova <ol...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Olga Sharonova (Gerrit)

unread,
6:50 AM (9 hours ago) 6:50 AM
to Henrik Andreasson, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
Attention needed from Henrik Andreasson

Olga Sharonova voted and added 1 comment

Votes added by Olga Sharonova

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Olga Sharonova . resolved

LGTM

Open in Gerrit

Related details

Attention is currently required from:
  • Henrik Andreasson
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I27244d66e3a4ea736166f6d5a6b6272c1274566c
    Gerrit-Change-Number: 7633165
    Gerrit-PatchSet: 5
    Gerrit-Owner: Henrik Andreasson <hen...@chromium.org>
    Gerrit-Reviewer: Henrik Andreasson <hen...@chromium.org>
    Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
    Gerrit-Attention: Henrik Andreasson <hen...@chromium.org>
    Gerrit-Comment-Date: Thu, 05 Mar 2026 11:50:17 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Olga Sharonova (Gerrit)

    unread,
    6:58 AM (9 hours ago) 6:58 AM
    to Henrik Andreasson, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
    Attention needed from Henrik Andreasson

    Olga Sharonova voted Code-Review+0

    Code-Review+0
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Henrik Andreasson
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I27244d66e3a4ea736166f6d5a6b6272c1274566c
      Gerrit-Change-Number: 7633165
      Gerrit-PatchSet: 5
      Gerrit-Owner: Henrik Andreasson <hen...@chromium.org>
      Gerrit-Reviewer: Henrik Andreasson <hen...@chromium.org>
      Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
      Gerrit-Attention: Henrik Andreasson <hen...@chromium.org>
      Gerrit-Comment-Date: Thu, 05 Mar 2026 11:58:23 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Olga Sharonova (Gerrit)

      unread,
      7:03 AM (9 hours ago) 7:03 AM
      to Henrik Andreasson, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
      Attention needed from Henrik Andreasson

      Olga Sharonova added 1 comment

      File media/audio/audio_manager_base.cc
      Line 265, Patchset 5 (Latest): // is deleted on the audio thread.
      Olga Sharonova . unresolved

      Nothing says it's constructed on the same thread it's deleted on? Also AudioManagerBase destructor does not say anything about threading.

      Can we log from AudioManagerBase::GetDeviceLogHelper() or from LogHelper constructor?

      Gerrit-Comment-Date: Thu, 05 Mar 2026 12:03:44 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Henrik Andreasson (Gerrit)

      unread,
      8:50 AM (7 hours ago) 8:50 AM
      to Olga Sharonova, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
      Attention needed from Olga Sharonova

      Henrik Andreasson added 2 comments

      Patchset-level comments
      File-level comment, Patchset 5:
      Henrik Andreasson . resolved

      Done.

      File media/audio/audio_manager_base.cc
      Line 265, Patchset 5: // is deleted on the audio thread.
      Olga Sharonova . resolved

      Nothing says it's constructed on the same thread it's deleted on? Also AudioManagerBase destructor does not say anything about threading.

      Can we log from AudioManagerBase::GetDeviceLogHelper() or from LogHelper constructor?

      Henrik Andreasson

      Good catch. I agree that PostTask is unsafe here since the destructor makes no thread guarantees. Sorry for that.

      Now moved the log to the DeviceLogHelper constructor as you suggested.

      FYI: this means we will now log lazily on the first device enumeration rather than strictly at AudioManager construction (which we did in the version where I broke out the log to OwningAudioManagerAccessor), but since enumeration happens immediately after a process restart anyway, we are still good.

      Logs are also emitted now if I crash the audio process and it restarts.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Olga Sharonova
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I27244d66e3a4ea736166f6d5a6b6272c1274566c
      Gerrit-Change-Number: 7633165
      Gerrit-PatchSet: 5
      Gerrit-Owner: Henrik Andreasson <hen...@chromium.org>
      Gerrit-Reviewer: Henrik Andreasson <hen...@chromium.org>
      Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
      Gerrit-Attention: Olga Sharonova <ol...@chromium.org>
      Gerrit-Comment-Date: Thu, 05 Mar 2026 13:50:30 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Olga Sharonova <ol...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Henrik Andreasson (Gerrit)

      unread,
      8:51 AM (7 hours ago) 8:51 AM
      to Olga Sharonova, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
      Attention needed from Olga Sharonova

      Henrik Andreasson added 1 comment

      File services/audio/owning_audio_manager_accessor.cc
      Line 137, Patchset 3: am_base->LogAudioServiceStartup(
      Olga Sharonova . resolved

      Why can't we log it in AM constructor?

      Henrik Andreasson

      We can and I have changed the design now.

      It was easier to do it after AMB ctor was done since accessing the audio log factory directly in the ctor can be risky (breaks test and so on).

      I tried to make a clean solution that should be safe.

      Henrik Andreasson

      Now removed.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Olga Sharonova
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I27244d66e3a4ea736166f6d5a6b6272c1274566c
        Gerrit-Change-Number: 7633165
        Gerrit-PatchSet: 6
        Gerrit-Owner: Henrik Andreasson <hen...@chromium.org>
        Gerrit-Reviewer: Henrik Andreasson <hen...@chromium.org>
        Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
        Gerrit-Attention: Olga Sharonova <ol...@chromium.org>
        Gerrit-Comment-Date: Thu, 05 Mar 2026 13:50:56 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Olga Sharonova <ol...@chromium.org>
        Comment-In-Reply-To: Henrik Andreasson <hen...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Olga Sharonova (Gerrit)

        unread,
        11:20 AM (5 hours ago) 11:20 AM
        to Henrik Andreasson, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
        Attention needed from Henrik Andreasson

        Olga Sharonova added 2 comments

        Patchset-level comments
        File-level comment, Patchset 6 (Latest):
        Olga Sharonova . unresolved
        Side question: why do we do
        AudioLogFactory::AudioComponent::kAudioInputController for enumeration log?
        File media/audio/audio_manager_base.cc
        Line 106, Patchset 6 (Latest): // Emitted on the first device enumeration and at audio process restarts.
        Olga Sharonova . unresolved

        Ok, so this is a bad place to have this log? Because output streams can be created before that?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Henrik Andreasson
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I27244d66e3a4ea736166f6d5a6b6272c1274566c
          Gerrit-Change-Number: 7633165
          Gerrit-PatchSet: 6
          Gerrit-Owner: Henrik Andreasson <hen...@chromium.org>
          Gerrit-Reviewer: Henrik Andreasson <hen...@chromium.org>
          Gerrit-Reviewer: Olga Sharonova <ol...@chromium.org>
          Gerrit-Attention: Henrik Andreasson <hen...@chromium.org>
          Gerrit-Comment-Date: Thu, 05 Mar 2026 16:19:51 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages