Skip to content

Commit

Permalink
[syncd] always log ASIC operations performed after warm restart (soni…
Browse files Browse the repository at this point in the history
…c-net#378)

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
  • Loading branch information
yxieca authored Nov 14, 2018
1 parent ebb9b7a commit 11c386e
Showing 1 changed file with 18 additions and 21 deletions.
39 changes: 18 additions & 21 deletions syncd/syncd_applyview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7072,36 +7072,33 @@ void executeOperationsOnAsic(
if (enableUnittests())
dumpComparisonLogicOutput(currentView);

if (enableRefernceCountLogs)
{
currentView.dumpVidToAsicOperatioId();
currentView.dumpVidToAsicOperatioId();

SWSS_LOG_NOTICE("NOT optimized operations");
SWSS_LOG_NOTICE("NOT optimized operations");

for (const auto &op: currentView.asicGetOperations())
{
const std::string &key = kfvKey(*op.op);
const std::string &opp = kfvOp(*op.op);
for (const auto &op: currentView.asicGetOperations())
{
const std::string &key = kfvKey(*op.op);
const std::string &opp = kfvOp(*op.op);

SWSS_LOG_WARN("%s: %s", opp.c_str(), key.c_str());
SWSS_LOG_NOTICE("%s: %s", opp.c_str(), key.c_str());

const auto &values = kfvFieldsValues(*op.op);
const auto &values = kfvFieldsValues(*op.op);

for (auto v: values)
{
SWSS_LOG_WARN("- %s %s", fvField(v).c_str(), fvValue(v).c_str());
}
for (auto v: values)
{
SWSS_LOG_NOTICE("- %s %s", fvField(v).c_str(), fvValue(v).c_str());
}
}

SWSS_LOG_NOTICE("optimized operations!");
SWSS_LOG_NOTICE("optimized operations!");

for (const auto &op: currentView.asicGetWithOptimizedRemoveOperations())
{
const std::string &key = kfvKey(*op.op);
const std::string &opp = kfvOp(*op.op);
for (const auto &op: currentView.asicGetWithOptimizedRemoveOperations())
{
const std::string &key = kfvKey(*op.op);
const std::string &opp = kfvOp(*op.op);

SWSS_LOG_WARN("%s: %s", opp.c_str(), key.c_str());
}
SWSS_LOG_NOTICE("%s: %s", opp.c_str(), key.c_str());
}

//for (const auto &op: currentView.asicGetOperations())
Expand Down

0 comments on commit 11c386e

Please sign in to comment.