New issue
Advanced search Search tips

Issue 760614 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 10
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task



Sign in to add a comment

Replace zucchini labels by targets affinity

Project Member Reported by etiennep@chromium.org, Aug 30 2017

Issue description

We propose to refactor zucchini's targets association mechanism.
Current mechanism:
Targets are projected from |old| to |new| and are associated based on
matching labels.
New mechanism:
Introduce a new class TargetsAffinity that infers affinities form EquivalenceMap. A first implementation will search for the largest surrounding Equivalence. Labels are assigned based on affinities.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c78f94a073448195317a88fe91444ac544593eae

commit c78f94a073448195317a88fe91444ac544593eae
Author: Etienne Pierre-Doray <etiennep@chromium.org>
Date: Tue Oct 03 14:28:54 2017

[Zucchini] Introduce targets affinity.

This CL adds TargetsAffinity and unittests to represent and work with
affinity between targets. This is meant to replace use of
MakeNewTargetsFromEquivalenceMap() for target association and labelling,
and is being integrated in a follow-up CL (630558).

Bug:  760614 
Change-Id: I9cec412b067f146807adb4aa00c9c1eda21bec55
Reviewed-on: https://chromium-review.googlesource.com/643886
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506031}
[modify] https://crrev.com/c78f94a073448195317a88fe91444ac544593eae/chrome/installer/zucchini/BUILD.gn
[modify] https://crrev.com/c78f94a073448195317a88fe91444ac544593eae/chrome/installer/zucchini/equivalence_map.h
[modify] https://crrev.com/c78f94a073448195317a88fe91444ac544593eae/chrome/installer/zucchini/image_utils.h
[add] https://crrev.com/c78f94a073448195317a88fe91444ac544593eae/chrome/installer/zucchini/targets_affinity.cc
[add] https://crrev.com/c78f94a073448195317a88fe91444ac544593eae/chrome/installer/zucchini/targets_affinity.h
[add] https://crrev.com/c78f94a073448195317a88fe91444ac544593eae/chrome/installer/zucchini/targets_affinity_unittest.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Oct 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/16939e17afbde579a08d22a987c5f379f8875abd

commit 16939e17afbde579a08d22a987c5f379f8875abd
Author: Samuel Huang <huangs@chromium.org>
Date: Tue Oct 03 14:49:17 2017

Revert "[Zucchini] Introduce targets affinity."

This reverts commit c78f94a073448195317a88fe91444ac544593eae.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> [Zucchini] Introduce targets affinity.
> 
> This CL adds TargetsAffinity and unittests to represent and work with
> affinity between targets. This is meant to replace use of
> MakeNewTargetsFromEquivalenceMap() for target association and labelling,
> and is being integrated in a follow-up CL (630558).
> 
> Bug:  760614 
> Change-Id: I9cec412b067f146807adb4aa00c9c1eda21bec55
> Reviewed-on: https://chromium-review.googlesource.com/643886
> Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
> Reviewed-by: Samuel Huang <huangs@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#506031}

TBR=huangs@chromium.org,etiennep@chromium.org

Change-Id: I6a609d2911ff5441a625548c1ff6db177f2fb8aa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  760614 
Reviewed-on: https://chromium-review.googlesource.com/698004
Reviewed-by: Samuel Huang <huangs@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506035}
[modify] https://crrev.com/16939e17afbde579a08d22a987c5f379f8875abd/chrome/installer/zucchini/BUILD.gn
[modify] https://crrev.com/16939e17afbde579a08d22a987c5f379f8875abd/chrome/installer/zucchini/equivalence_map.h
[modify] https://crrev.com/16939e17afbde579a08d22a987c5f379f8875abd/chrome/installer/zucchini/image_utils.h
[delete] https://crrev.com/de445af03efead537cd6715f5e32586bf1968868/chrome/installer/zucchini/targets_affinity.cc
[delete] https://crrev.com/de445af03efead537cd6715f5e32586bf1968868/chrome/installer/zucchini/targets_affinity.h
[delete] https://crrev.com/de445af03efead537cd6715f5e32586bf1968868/chrome/installer/zucchini/targets_affinity_unittest.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Dec 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/01319560dd1e9c2584051e1a0d38b6d00a8be98c

commit 01319560dd1e9c2584051e1a0d38b6d00a8be98c
Author: Etienne Pierre-Doray <etiennep@chromium.org>
Date: Sat Dec 30 22:56:28 2017

[Zucchini] Refactor ImageIndex to prepare for use with TargetsAffinity.

This CL refactors several components related to ImageIndex, aiming to use TargetsAffinity
in a follow-up CL (630558). Mainly:

- TypeInfo becomes ReferenceSet with better encapsulation. Targets are now
  indirect to prepare for use of TargetsAffinity.
- PoolInfo becomes TargetPool and also stores a list of targets.
- LabelTargets()/LabelAssociatedTargets()/UnlabelTargets() are
    implemented in TargetPool.

Bug:  760614 
Change-Id: I28f01fe2e7da036f44ad4fc6e30487b99dfb628d
Reviewed-on: https://chromium-review.googlesource.com/844016
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526410}
[modify] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/BUILD.gn
[modify] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/algorithm.h
[modify] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/encoded_view.cc
[modify] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/encoded_view.h
[modify] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/encoded_view_unittest.cc
[modify] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/equivalence_map.cc
[modify] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/equivalence_map.h
[modify] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/equivalence_map_unittest.cc
[modify] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/image_index.cc
[modify] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/image_index.h
[modify] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/image_index_unittest.cc
[modify] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/image_utils.h
[modify] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/label_manager.cc
[add] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/reference_set.cc
[add] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/reference_set.h
[add] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/reference_set_unittest.cc
[add] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/target_pool.cc
[add] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/target_pool.h
[add] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/target_pool_unittest.cc
[modify] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/zucchini_gen.cc
[modify] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/zucchini_gen.h
[modify] https://crrev.com/01319560dd1e9c2584051e1a0d38b6d00a8be98c/chrome/installer/zucchini/zucchini_gen_unittest.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Jan 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1fe4f0b28e377c8d7ec3cb86c552e5ad7136f9fc

commit 1fe4f0b28e377c8d7ec3cb86c552e5ad7136f9fc
Author: Etienne Pierre-Doray <etiennep@chromium.org>
Date: Tue Jan 02 23:31:15 2018

[Zucchini] Refactor zucchini_gen to avoid labelling and marking.

This CL refactors following functions and unittest in zucchini_gen:
- FindExtraTargets()
- GenerateReferencesDelta()
Implementation is changed, but implies no side effect (patch is identical). As
a result, labelling and marking of targets is avoided, reducing usage of LabelManager.

Bug:  760614 
Change-Id: I7b8e59f938f3c3b5f8edaa6125649d4ae1c02a0d
Reviewed-on: https://chromium-review.googlesource.com/845094
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526548}
[modify] https://crrev.com/1fe4f0b28e377c8d7ec3cb86c552e5ad7136f9fc/chrome/installer/zucchini/label_manager.h
[modify] https://crrev.com/1fe4f0b28e377c8d7ec3cb86c552e5ad7136f9fc/chrome/installer/zucchini/zucchini_gen.cc
[modify] https://crrev.com/1fe4f0b28e377c8d7ec3cb86c552e5ad7136f9fc/chrome/installer/zucchini/zucchini_gen.h
[modify] https://crrev.com/1fe4f0b28e377c8d7ec3cb86c552e5ad7136f9fc/chrome/installer/zucchini/zucchini_gen_unittest.cc

CL630558 reduces compressed patch size by ~0.3% for chrome.dll and chrome_child.dll.
https://docs.google.com/spreadsheets/d/15gUluKDbS_J4bmk5I9JwtoQlKyoSjTSM_xxTWgEVERg/edit?usp=sharing
Project Member

Comment 7 by bugdroid1@chromium.org, Jan 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/efe28341886d3c46111877633b928e472283fe77

commit efe28341886d3c46111877633b928e472283fe77
Author: Etienne Pierre-Doray <etiennep@chromium.org>
Date: Tue Jan 09 14:27:02 2018

[Zucchini] Use TargetsAffinity for target association.

This CL brings changes in ImageIndex to use target affinities
and to avoid mutation of ImageIndex. Mainly:

- ImageIndex becomes immutable after initialization.
- LabelTargets()/LabelAssociatedTargets()/UnlabelTargets() are
  removed.
- EncodedView uses labels directly to compute Projection(), using
  lookups in a label table.
  - Introduce EncodedView::PoolInfo to hold data.

Note that LabelManager is still being used to minimize changes, even
though most of its functionality are stripped down. It will be
remove as a follow-up CL (627188) that simplifies reference delta.

Bug:  760614 
Change-Id: Ia8aaa7e5f287480c987d65a5dc24b01e7d1622dd
Reviewed-on: https://chromium-review.googlesource.com/630558
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527986}
[modify] https://crrev.com/efe28341886d3c46111877633b928e472283fe77/chrome/installer/zucchini/encoded_view.cc
[modify] https://crrev.com/efe28341886d3c46111877633b928e472283fe77/chrome/installer/zucchini/encoded_view.h
[modify] https://crrev.com/efe28341886d3c46111877633b928e472283fe77/chrome/installer/zucchini/encoded_view_unittest.cc
[modify] https://crrev.com/efe28341886d3c46111877633b928e472283fe77/chrome/installer/zucchini/equivalence_map.cc
[modify] https://crrev.com/efe28341886d3c46111877633b928e472283fe77/chrome/installer/zucchini/equivalence_map.h
[modify] https://crrev.com/efe28341886d3c46111877633b928e472283fe77/chrome/installer/zucchini/equivalence_map_unittest.cc
[modify] https://crrev.com/efe28341886d3c46111877633b928e472283fe77/chrome/installer/zucchini/image_index.cc
[modify] https://crrev.com/efe28341886d3c46111877633b928e472283fe77/chrome/installer/zucchini/image_index.h
[modify] https://crrev.com/efe28341886d3c46111877633b928e472283fe77/chrome/installer/zucchini/label_manager.cc
[modify] https://crrev.com/efe28341886d3c46111877633b928e472283fe77/chrome/installer/zucchini/label_manager.h
[modify] https://crrev.com/efe28341886d3c46111877633b928e472283fe77/chrome/installer/zucchini/label_manager_unittest.cc
[modify] https://crrev.com/efe28341886d3c46111877633b928e472283fe77/chrome/installer/zucchini/target_pool.cc
[modify] https://crrev.com/efe28341886d3c46111877633b928e472283fe77/chrome/installer/zucchini/target_pool.h
[modify] https://crrev.com/efe28341886d3c46111877633b928e472283fe77/chrome/installer/zucchini/target_pool_unittest.cc
[modify] https://crrev.com/efe28341886d3c46111877633b928e472283fe77/chrome/installer/zucchini/zucchini_gen.cc
[modify] https://crrev.com/efe28341886d3c46111877633b928e472283fe77/chrome/installer/zucchini/zucchini_gen.h

Project Member

Comment 8 by bugdroid1@chromium.org, Jul 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/73700ba3514022935172ea8b1b7f7eb257f1d0d3

commit 73700ba3514022935172ea8b1b7f7eb257f1d0d3
Author: Etienne Pierre-doray <etiennep@chromium.org>
Date: Mon Jul 09 21:47:44 2018

[Zucchini] Update definition of Label from README.

Labels are not assigned to targets anymore, so the definition is now meaningless.
Instead, target affinity is defined.
This should allow us to finally close tracking bug.

Bug:  760614 
Change-Id: Id705837bd502ae0e6333b9fc8cab250bc590ff11
Reviewed-on: https://chromium-review.googlesource.com/1119388
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573461}
[modify] https://crrev.com/73700ba3514022935172ea8b1b7f7eb257f1d0d3/components/zucchini/README.md

Status: Fixed (was: Untriaged)

Sign in to add a comment